[Numpy-discussion] Clarifications in numpy.ma module

2014-12-30 Thread Maniteja Nandana
Hi all, I have recently been trying out various functions in masked array module of numpy. I have got confused at a places in the *core.py *of *ma *module. 1. In the *masked_equal *method, the docstring doesn't suggest that the *fill_value *gets updated by the *value *parameter of the function,

Re: [Numpy-discussion] Clarifications in numpy.ma module

2014-12-30 Thread Maniteja Nandana
Guys, sorry for the incomplete message, *_DomainedBinaryOperation *for divide remainder Related to issue 5354, where the docstring for _*MaskedBinaryOperation *says that invalid values are pre-masked*, but for **_DomainedBinaryOperation *where the invalid values are masked in result, even if

Re: [Numpy-discussion] Why is numpy.ma.extras.clump_masked() not in main documentation?

2014-12-30 Thread Benjamin Root
Wow, thanks for pointing these out! I have been using masked arrays for quite a while now, but I never noticed these before! Cheers! Ben Root On Sun, Dec 28, 2014 at 3:35 PM, Yuxiang Wang yw...@virginia.edu wrote: Hi Ralf, Thanks for the quick response! I will submit a PR soon. I noticed

Re: [Numpy-discussion] Clarifications in numpy.ma module

2014-12-30 Thread Benjamin Root
What do you mean that the mean function doesn't take care of the case where the array is empty? In the example you provided, they both end up being NaN, which is exactly correct. Ben Root On Tue, Dec 30, 2014 at 6:10 AM, Maniteja Nandana maniteja.modesty...@gmail.com wrote: Guys, sorry for

Re: [Numpy-discussion] Clarifications in numpy.ma module

2014-12-30 Thread Alexander Belopolsky
On Tue, Dec 30, 2014 at 1:45 PM, Benjamin Root ben.r...@ou.edu wrote: What do you mean that the mean function doesn't take care of the case where the array is empty? In the example you provided, they both end up being NaN, which is exactly correct. Operations on masked arrays should not

Re: [Numpy-discussion] Clarifications in numpy.ma module

2014-12-30 Thread Benjamin Root
Where does it say that operations on masked arrays should not produce NaNs? Operations on masked arrays should ignore masked data. If I have NaNs in my masked array, but are not masked out for some reason, I expect it to give me NaNs. The mask is not the same as NaNs. Having np.mean([]) return the

[Numpy-discussion] ANN: Scipy 0.14.1 release

2014-12-30 Thread Pauli Virtanen
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dear all, We are pleased to announce the Scipy 0.14.1 release. The 0.14.1 release is a bugfix-only release, addressing the following issues: - - gh-3630 NetCDF reading results in a segfault - - gh-3631 SuperLU object not working as expected for

Re: [Numpy-discussion] Clarifications in numpy.ma module

2014-12-30 Thread Alexander Belopolsky
On Tue, Dec 30, 2014 at 2:49 PM, Benjamin Root ben.r...@ou.edu wrote: Where does it say that operations on masked arrays should not produce NaNs? Masked arrays were invented with the specific goal to avoid carrying NaNs in computations. Back in the days, NaNs were not available on some

Re: [Numpy-discussion] Clarifications in numpy.ma module

2014-12-30 Thread Benjamin Root
On Tue, Dec 30, 2014 at 3:29 PM, Alexander Belopolsky ndar...@mac.com wrote: On Tue, Dec 30, 2014 at 2:49 PM, Benjamin Root ben.r...@ou.edu wrote: Where does it say that operations on masked arrays should not produce NaNs? Masked arrays were invented with the specific goal to avoid

Re: [Numpy-discussion] Clarifications in numpy.ma module

2014-12-30 Thread Maniteja Nandana
I was just referring to the exception raised in the case where the length of the array is zero. I have not thought if the example provided by @Alexander. I was also wondering if the automatic masking of NaN should be done or not, which is why I asked about the difference in the operating named

Re: [Numpy-discussion] Clarifications in numpy.ma module

2014-12-30 Thread Benjamin Root
exception? Did you mean warning? If warning, I recall some discussion recently to figure out a way to hide that, but only for masked values (I would want to see the warning if I do bad calculations in the unmasked portions of my array). Now I see your point 3 much more clearly. I had never

Re: [Numpy-discussion] Access dtype kind from cython

2014-12-30 Thread Valentin Haenel
* Eric Moore e...@redtetrahedron.org [2014-12-30]: On Monday, December 29, 2014, Valentin Haenel valen...@haenel.co wrote: Hi, how do I access the kind of the data from cython, i.e. the single character string: 'b' boolean 'i' (signed) integer 'u' unsigned integer 'f'

Re: [Numpy-discussion] Access dtype kind from cython

2014-12-30 Thread Nathaniel Smith
On Tue, Dec 30, 2014 at 11:03 PM, Valentin Haenel valen...@haenel.co wrote: * Eric Moore e...@redtetrahedron.org [2014-12-30]: On Monday, December 29, 2014, Valentin Haenel valen...@haenel.co wrote: Hi, how do I access the kind of the data from cython, i.e. the single character string:

Re: [Numpy-discussion] Clarifications in numpy.ma module

2014-12-30 Thread Nathaniel Smith
On Tue, Dec 30, 2014 at 10:56 PM, Benjamin Root ben.r...@ou.edu wrote: exception? Did you mean warning? If warning, I recall some discussion recently to figure out a way to hide that, but only for masked values (I would want to see the warning if I do bad calculations in the unmasked portions

Re: [Numpy-discussion] Clarifications in numpy.ma module

2014-12-30 Thread Maniteja Nandana
On 31-Dec-2014 4:53 am, Nathaniel Smith n...@pobox.com wrote: On Tue, Dec 30, 2014 at 10:56 PM, Benjamin Root ben.r...@ou.edu wrote: exception? Did you mean warning? If warning, I recall some discussion recently to figure out a way to hide that, but only for masked values (I would want to

Re: [Numpy-discussion] Clarifications in numpy.ma module

2014-12-30 Thread Benjamin Root
Maniteja, Careful with advertising that you are reading up on any under-maintained codebases. I did that for mplot3d four years ago and the previous maintainer said tag! you're it! I haven't been able to tag anyone since then... Cheers! Ben Root On Tue, Dec 30, 2014 at 6:34 PM, Maniteja