> The footer appended by the mailing list shows that the name it’s right but
> only the subject tag is wrong. It’s trivial to fix.
You are probably right, but I wouldn't like to mess up with people's mail
filters (some of which may depend on the subject tag).
Cheers,
Bartosz
__
Hi,
The general consensus seems to be in favour of using "NumPy" when referring to
the project and "numpy" as a module name.
Please note that there are currently PRs in 3 different repositories
implementing this practice:
- numpy docs: https://github.com/numpy/numpy/pull/8021
- numpy.org websi
Hi,
I would not mind any choice as long as it's consistent.
I agree that using all-lowercase spelling may avoid some common errors. However,
PEP8 requires all module/package names to be lower case [1]. If we force the
name of the library and the corresponding package to be the same, all Python
l
This will be indeed very helpful. Thanks.
> Well, if you really need to do this in more than one place, define a
> utility function and call it a day.
>
> def should_not_plot(x):
>if x is None:
>return True
>elif isinstance(x, np.ndarray):
>return x.size == 0
>else:
>
Thank you for your tips. I was not aware of the possible problems with len.
> There is no way to test all of the cases (empty sequence, empty array,
> None) in the same way. Usually, it's a bad idea to conflate the three.
I agree that this should be avoided. However, there are cases in which it i
I have been using numpy for several years and I am very impressed with its
flexibility. However, there is one problem that has always bothered me.
Quite often I need to test consistently whether a variable is any of the
following: an empty list, an empty array or None. Since both arrays and list
Hi,
numpy.var on a memory mapped array returns a 0-d memmap object instead of a
scalar (like with numpy arrays):
>>> import numpy as np
>>> fp = np.memmap('test.mm', dtype='float32', mode='w+', shape=(10,))
>>> fp[:] = np.random.rand(10)
>>> fp_var= np.var(fp)
>>> print type(fp_var)
>>> print f