[Numpy-discussion] Choosing between NumPy and SciPy functions
hoogendoorn.eelco at gmail.com
Mon Oct 27 14:24:35 EDT 2014
The same occurred to me when reading that question. My personal opinion is
that such functionality should be deprecated from numpy. I don't know who
said this, but it really stuck with me: but the power of numpy is first and
foremost in it being a fantastic interface, not in being a library.
There is nothing more annoying than every project having its own array
type. The fact that the whole scientific python stack can so seamlessly
communicate is where all good things begin.
In my opinion, that is what numpy should focus on; basic data structures,
and tools for manipulating them. Linear algebra is way too high level for
numpy imo, and used by only a small subsets of its 'matlab-like' users.
When I get serious about linear algebra or ffts or what have you, id rather
import an extra module that wraps a specific library.
On Mon, Oct 27, 2014 at 2:26 PM, D. Michael McFarland <dmmcf at dmmcf.net>
> A recent post raised a question about differences in results obtained
> with numpy.linalg.eigh() and scipy.linalg.eigh(), documented at
> respectively. It is clear that these functions address different
> mathematical problems (among other things, the SciPy routine can solve
> the generalized as well as standard eigenproblems); I am not concerned
> here with numerical differences in the results for problems both should
> be able to solve (the author of the original post received useful
> replies in that thread).
> What I would like to ask about is the situation this illustrates, where
> both NumPy and SciPy provide similar functionality (sometimes identical,
> to judge by the documentation). Is there some guidance on which is to
> be preferred? I could argue that using only NumPy when possible avoids
> unnecessary dependence on SciPy in some code, or that using SciPy
> consistently makes for a single interface and so is less error prone.
> Is there a rule of thumb for cases where SciPy names shadow NumPy names?
> I've used Python for a long time, but have only recently returned to
> doing serious numerical work with it. The tools are very much improved,
> but sometimes, like now, I feel I'm missing the obvious. I would
> appreciate pointers to any relevant documentation, or just a summary of
> conventional wisdom on the topic.
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion