[Numpy-discussion] no more search capability?

2013-12-05 Thread Slavin, Jonathan
Hi all, Although I like the look of the newly designed numpy/scipy web pages, I have to say that I really miss the search capability. Is there any motion toward restoring that? Jon -- Jonathan D. Slavin

Re: [Numpy-discussion] no more search capability?

2013-12-05 Thread Slavin, Jonathan
Answering part of my own question, I see that there is still a search capability on one of the numpy web pages, but it's not where it used to be and, in my opinion, is not easy to find. There used to be a search box on each web page of the numpy docs. Jon On Thu, Dec 5, 2013 at 1:00 PM,

[Numpy-discussion] Deprecate boolean math operators?

2013-12-05 Thread Sebastian Berg
Hey, there was a discussion that for numpy booleans math operators +,-,* (and the unary -), while defined, are not very helpful. I have set up a quick PR with start (needs some fixes inside numpy still): https://github.com/numpy/numpy/pull/4105 The idea is to deprecate these, since the binary

Re: [Numpy-discussion] Deprecate boolean math operators?

2013-12-05 Thread Alexander Belopolsky
On Thu, Dec 5, 2013 at 5:37 PM, Sebastian Berg sebast...@sipsolutions.netwrote: For the moment I saw one annoying change in numpy, and that is `abs(x - y)` being used for allclose and working nicely currently. It would probably be an improvement if allclose returned all(x == y) unless one of

[Numpy-discussion] surprising behavior of np.asarray on masked arrays

2013-12-05 Thread Faraz Mirzaei
Hi, If I pass a masked array through np.asarray, I get original unmasked array. Example: test = np.array([[1, 0], [-1, 3]]) testMasked = ma.masked_less_equal(test, 0) print testMasked [[1 --] [-- 3]] print testMasked.fill_value 99 print np.asarray(testMasked) [[ 1 0] [-1 3]]

Re: [Numpy-discussion] Deprecate boolean math operators?

2013-12-05 Thread josef . pktd
On Thu, Dec 5, 2013 at 5:37 PM, Sebastian Berg sebast...@sipsolutions.net wrote: Hey, there was a discussion that for numpy booleans math operators +,-,* (and the unary -), while defined, are not very helpful. I have set up a quick PR with start (needs some fixes inside numpy still):

Re: [Numpy-discussion] Deprecate boolean math operators?

2013-12-05 Thread josef . pktd
On Thu, Dec 5, 2013 at 10:33 PM, josef.p...@gmail.com wrote: On Thu, Dec 5, 2013 at 5:37 PM, Sebastian Berg sebast...@sipsolutions.net wrote: Hey, there was a discussion that for numpy booleans math operators +,-,* (and the unary -), while defined, are not very helpful. I have set up a

Re: [Numpy-discussion] Deprecate boolean math operators?

2013-12-05 Thread Alexander Belopolsky
On Thu, Dec 5, 2013 at 5:37 PM, Sebastian Berg sebast...@sipsolutions.net wrote: there was a discussion that for numpy booleans math operators +,-,* (and the unary -), while defined, are not very helpful. It has been suggested at the Github that there is an area where it is useful to have

Re: [Numpy-discussion] Deprecate boolean math operators?

2013-12-05 Thread Alexander Belopolsky
On Thu, Dec 5, 2013 at 10:35 PM, josef.p...@gmail.com wrote: what about np.dot,np.dot(mask, x) which is the same as (mask * x).sum(0) ? I am not sure which way your argument goes, but I don't think you would find the following natural: x = array([True, True]) dot(x,x) True (x*x).sum()

Re: [Numpy-discussion] Deprecate boolean math operators?

2013-12-05 Thread josef . pktd
On Thu, Dec 5, 2013 at 10:56 PM, Alexander Belopolsky ndar...@mac.com wrote: On Thu, Dec 5, 2013 at 5:37 PM, Sebastian Berg sebast...@sipsolutions.net wrote: there was a discussion that for numpy booleans math operators +,-,* (and the unary -), while defined, are not very helpful. It has

Re: [Numpy-discussion] Deprecate boolean math operators?

2013-12-05 Thread Alan G Isaac
For + and * (and thus `dot`), this will fix something that is not broken. It is in fact in conformance with a large literature on boolean arrays and boolean matrices. That not everyone pays attention to this literature does not constitute a reason to break the extant, correct behavior. I'm sure

Re: [Numpy-discussion] Deprecate boolean math operators?

2013-12-05 Thread Alexander Belopolsky
On Thu, Dec 5, 2013 at 11:05 PM, Alan G Isaac alan.is...@gmail.com wrote: For + and * (and thus `dot`), this will fix something that is not broken. + and * are not broken - just redundant given | and . What is really broken is -, both unary and binary: int(np.bool_(0) - np.bool_(1)) 1

Re: [Numpy-discussion] surprising behavior of np.asarray on masked arrays

2013-12-05 Thread Stéfan van der Walt
Hi Faraz On Thu, 05 Dec 2013 19:14:01 -0800, Faraz Mirzaei wrote: If I pass a masked array through np.asarray, I get original unmasked array. `asarray` disregards any information attached to the underlying ndarray by the subclass. To preserve the subclass, you'd need to use `asanyarray`. The

Re: [Numpy-discussion] Deprecate boolean math operators?

2013-12-05 Thread josef . pktd
On Thu, Dec 5, 2013 at 11:00 PM, Alexander Belopolsky ndar...@mac.com wrote: On Thu, Dec 5, 2013 at 10:35 PM, josef.p...@gmail.com wrote: what about np.dot,np.dot(mask, x) which is the same as (mask * x).sum(0) ? I am not sure which way your argument goes, but I don't think you would

Re: [Numpy-discussion] surprising behavior of np.asarray on masked arrays

2013-12-05 Thread Eric Firing
On 2013/12/05 5:14 PM, Faraz Mirzaei wrote: Hi, If I pass a masked array through np.asarray, I get original unmasked array. Example: test = np.array([[1, 0], [-1, 3]]) testMasked = ma.masked_less_equal(test, 0) print testMasked [[1 --] [-- 3]] print testMasked.fill_value