Re: [Numpy-discussion] casting from datetime64

2019-05-12 Thread Sebastian Berg
Hi Alex, On Mon, 2019-05-13 at 00:35 -0400, Alex Samuel wrote: > Hi, > > When registering a custom cast function from datetime64 to another > dtype, how can I get the units? > > I am calling PyArray_RegisterCastFunc from NPY_DATETIME. Ideally, > I'd like to register a separate cast function for

[Numpy-discussion] casting from datetime64

2019-05-12 Thread Alex Samuel
Hi, When registering a custom cast function from datetime64 to another dtype, how can I get the units? I am calling PyArray_RegisterCastFunc from NPY_DATETIME. Ideally, I'd like to register a separate cast function for each datetime64 units (or none at all... I don't want all units to be casta

[Numpy-discussion] folds and scans

2019-05-12 Thread Alan Isaac
What is the recommended (i.e., fast) way to do folds and scans across one axis of a NumPy array? (The equivalent of Mma's Fold and FoldList.) Assume an arbitrary Python function that produces one array from two arrays, where these three arrays share the same dimensions. (So the use of Python's `r

Re: [Numpy-discussion] Release vs development testing.

2019-05-12 Thread Charles R Harris
On Sun, May 12, 2019 at 7:27 AM Ralf Gommers wrote: > > > On Sun, May 12, 2019 at 3:56 PM Charles R Harris < > charlesr.har...@gmail.com> wrote: > >> >> >> On Sun, May 12, 2019 at 6:33 AM Julian Taylor < >> jtaylor.deb...@googlemail.com> wrote: >> >>> On 12.05.19 14:58, Charles R Harris wrote: >>

Re: [Numpy-discussion] Release vs development testing.

2019-05-12 Thread Ralf Gommers
On Sun, May 12, 2019 at 3:56 PM Charles R Harris wrote: > > > On Sun, May 12, 2019 at 6:33 AM Julian Taylor < > jtaylor.deb...@googlemail.com> wrote: > >> On 12.05.19 14:58, Charles R Harris wrote: >> > Hi All, >> > >> > NumPy currently distinguishes between release and development versions >> >

Re: [Numpy-discussion] Release vs development testing.

2019-05-12 Thread Charles R Harris
On Sun, May 12, 2019 at 6:33 AM Julian Taylor wrote: > On 12.05.19 14:58, Charles R Harris wrote: > > Hi All, > > > > NumPy currently distinguishes between release and development versions > > when running tests. Is there a good reason to continue this practice? I > > ask, because with the last p

Re: [Numpy-discussion] Release vs development testing.

2019-05-12 Thread Julian Taylor
On 12.05.19 14:58, Charles R Harris wrote: > Hi All, > > NumPy currently distinguishes between release and development versions > when running tests. Is there a good reason to continue this practice? I > ask, because with the last pytest release it would be convenient to > always include `pytest.i

[Numpy-discussion] Release vs development testing.

2019-05-12 Thread Charles R Harris
Hi All, NumPy currently distinguishes between release and development versions when running tests. Is there a good reason to continue this practice? I ask, because with the last pytest release it would be convenient to always include `pytest.ini ` so that we can register markers. The presence of `