SciPy appears to provide most (but not all [1]) of NumPy\'s functions in its own namespace. In other words, if there\'s a function named numpy.foo
, there\'s alm
In addition to the SciPy FAQ describing the duplication is mainly for backwards compatibility, it is further clarified in the NumPy documentation to say that
Optionally SciPy-accelerated routines (numpy.dual)
Aliases for functions which may be accelerated by Scipy.
SciPy can be built to use accelerated or otherwise improved libraries for FFTs, linear algebra, and special functions. This module allows developers to transparently support these accelerated functions when SciPy is available but still support users who have only installed NumPy.
For brevity, these are:
Also, from the SciPy Tutorial:
The top level of SciPy also contains functions from NumPy and numpy.lib.scimath. However, it is better to use them directly from the NumPy module instead.
So, for new applications, you should prefer the NumPy version of the array operations that are duplicated in the top level of SciPy. For the domains listed above, you should prefer those in SciPy and check backward compatibility if necessary in NumPy.
In my personal experience, most of the array functions I use exist in the top level of NumPy (except for random
). However, all the domain specific routines exist in subpackages of SciPy, so I rarely use anything from the top level of SciPy.