[SciPy-User] Does SciPy already supersed NumPy?

Robert Kern robert.kern at gmail.com
Tue Sep 30 11:18:06 EDT 2014


On Mon, Sep 29, 2014 at 5:49 PM, Sergio Rojas <sergio_r at mail.com> wrote:
> In the not so long past we were suppose to do:
>
>>>> import numpy as np
>>>> anumpy = np.arange(15).reshape(3, 5)
>>>> anumpy
> array([[ 0,  1,  2,  3,  4],
>        [ 5,  6,  7,  8,  9],
>        [10, 11, 12, 13, 14]])
>>>> anumpy.shape
> (3, 5)
>>>> anumpy.ndim
> 2
>>>> np.array([6, 7, 8])
> array([6, 7, 8])
>
> Now, one can also do:
>
>>>> import scipy as sp
>>>> sp.__version__
> '0.13.3'
>>>> ascipy = sp.arange(15).reshape(3, 5)
>>>> ascipy
> array([[ 0,  1,  2,  3,  4],
>        [ 5,  6,  7,  8,  9],
>        [10, 11, 12, 13, 14]])
>>>> ascipy.shape
> (3, 5)
>>>> ascipy.ndim
> 2
>>>> sp.array([6, 7, 8])
> array([6, 7, 8])
>
> Is it recomended to do so?
>
>  Does this means that SciPy has overloaded NumPy functions or that SciPy
> superseding NumPy?

No. See this section of the documentation:

http://docs.scipy.org/doc/scipy/reference/api.html#guidelines-for-importing-functions-from-scipy

-- 
Robert Kern



More information about the SciPy-User mailing list