Re: [Numpy-discussion] Which NumPy/Numpy/numpy spelling?

2016-09-08 Thread Bartosz Telenczuk
> 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

Re: [Numpy-discussion] Which NumPy/Numpy/numpy spelling?

2016-09-06 Thread Bartosz Telenczuk
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

Re: [Numpy-discussion] Which NumPy/Numpy/numpy spelling?

2016-08-29 Thread Bartosz Telenczuk
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

[Numpy-discussion] preferred way of testing empty arrays

2012-01-27 Thread Bartosz Telenczuk
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

Re: [Numpy-discussion] preferred way of testing empty arrays

2012-01-27 Thread Bartosz Telenczuk
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 is

[Numpy-discussion] numpy.var fails on memmap

2011-02-01 Thread Bartosz Telenczuk
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) class