Re: [Numpy-discussion] Compare NumPy arrays with threshold

2017-05-18 Thread Robert Kern
On Thu, May 18, 2017 at 5:07 AM, Nissim Derdiger wrote: > > Hi again, > Thanks for the responses to my question! > Roberts answer worked very well for me, except for 1 small issue: > > This line: > close_mask = np.isclose(MatA, MatB, Threshold, equal_nan=True) > returns each difference twice – onc

[Numpy-discussion] NumPy 1.13.0rc2 released

2017-05-18 Thread Charles R Harris
Hi All, I'm pleased to announce the NumPy 1.13.0rc2 release. This release supports Python 2.7 and 3.4-3.6 and contains many new features. It is one of the most ambitious releases in the last several years. Some of the highlights and new functions are *Highlights* - Operations like ``a + b + c

Re: [Numpy-discussion] failed to add routine to the core module

2017-05-18 Thread Sebastian Berg
On Thu, 2017-05-18 at 15:04 +0200, marc wrote: > Dear Numpy developers, > I'm trying to add a routine to calculate the sum of a product of two > arrays (a dot product). But that would not increase the memory (from > what I saw np.dot is increasing the memory while it should not be > necessary). The

Re: [Numpy-discussion] failed to add routine to the core module

2017-05-18 Thread marc
Hello Marten, Thank you for your help, effectively, the example that you propose is much easier to imitate, I can now continue further. Thanks, Marc On 05/18/2017 04:32 PM, Marten van Kerkwijk wrote: Hi Marc, ufuncs are quite tricky to compile. Part of your problem is that, I think, you sta

Re: [Numpy-discussion] failed to add routine to the core module

2017-05-18 Thread Marten van Kerkwijk
Hi Marc, ufuncs are quite tricky to compile. Part of your problem is that, I think, you started a bit too high up: `divmod` is also a binary operation, so that part you do not need at all. It may be an idea to start instead with a PR that implemented a new ufunc, e.g., https://github.com/numpy/num

[Numpy-discussion] failed to add routine to the core module

2017-05-18 Thread marc
Dear Numpy developers, I'm trying to add a routine to calculate the sum of a product of two arrays (a dot product). But that would not increase the memory (from what I saw np.dot is increasing the memory while it should not be necessary). The idea is to avoid the use of the temporary array in

Re: [Numpy-discussion] Compare NumPy arrays with threshold

2017-05-18 Thread Nissim Derdiger
Hi again, Thanks for the responses to my question! Roberts answer worked very well for me, except for 1 small issue: This line: close_mask = np.isclose(MatA, MatB, Threshold, equal_nan=True) returns each difference twice - once j in compare to I and once for I in compare to j for example: for t