Re: [Numpy-discussion] np.trunc is inconsistent with array-api

2021-09-10 Thread Sebastian Berg
On Fri, 2021-09-10 at 14:51 -0600, Aaron Meurer wrote: > On Thu, Sep 9, 2021 at 7:11 PM Sebastian Berg > wrote: > > > > On Sun, 2021-09-05 at 21:08 +0200, Ralf Gommers wrote: > > > On Sat, Sep 4, 2021 at 10:02 AM Kshitij Kalambarkar < > > > kshitijkalambar...@gmail.com> wrote: > > > > > > > Hi,

Re: [Numpy-discussion] np.trunc is inconsistent with array-api

2021-09-10 Thread Aaron Meurer
On Thu, Sep 9, 2021 at 7:11 PM Sebastian Berg wrote: > > On Sun, 2021-09-05 at 21:08 +0200, Ralf Gommers wrote: > > On Sat, Sep 4, 2021 at 10:02 AM Kshitij Kalambarkar < > > kshitijkalambar...@gmail.com> wrote: > > > > > Hi, > > > > > > np.trunc returns floating dtype output even for integral dtyp

Re: [Numpy-discussion] np.trunc is inconsistent with array-api

2021-09-09 Thread Sebastian Berg
On Sun, 2021-09-05 at 21:08 +0200, Ralf Gommers wrote: > On Sat, Sep 4, 2021 at 10:02 AM Kshitij Kalambarkar < > kshitijkalambar...@gmail.com> wrote: > > > Hi, > > > > np.trunc returns floating dtype output even for integral dtype > > input. As > > per array-api, it should preserve the input dtyp

Re: [Numpy-discussion] np.trunc is inconsistent with array-api

2021-09-09 Thread Aaron Meurer
On Sat, Sep 4, 2021 at 2:03 AM Kshitij Kalambarkar wrote: > > Hi, > > np.trunc returns floating dtype output even for integral dtype input. As per > array-api, it should preserve the input dtype. > > Note: This is also true for np.rint, np.fix, np.ceil, np.floor Probably worth noting that np.rou

Re: [Numpy-discussion] np.trunc is inconsistent with array-api

2021-09-05 Thread Ralf Gommers
On Sat, Sep 4, 2021 at 10:02 AM Kshitij Kalambarkar < kshitijkalambar...@gmail.com> wrote: > Hi, > > np.trunc returns floating dtype output even for integral dtype input. As > per array-api, it should preserve the input dtype. > Just a note that it's not compatibility with the array API standard

[Numpy-discussion] np.trunc is inconsistent with array-api

2021-09-04 Thread Kshitij Kalambarkar
Hi, np.trunc returns floating dtype output even for integral dtype input. As per array-api, it should preserve the input dtype. Note: This is also true for np.rint, np.fix, np.ceil, np.floor Reference: https://github.com/numpy/numpy/issues/19464 Possible Fix: 1. We update the behaviour directly