[Numpy-discussion] Re: Windows default integer now 64bit in main

2023-11-03 Thread Sebastian Berg
On Thu, 2023-11-02 at 19:37 +0100, Michael Siebert wrote:
> Hi Sebastian,
> 
> great news! Does that mean that Windows Numpy 64 bit default integers
> are coming before Numpy 2.0, like in Numpy 1.27? Will there be
> another release before 2.0?


NumPy 2 of course.  Way to big change.  There is no 1.27 planned as of
now, if it happens it would be a (big) backport release, though.
(Due to files having been moved around backports seem to be getting
harder, though.)

- Sebastian


> 
> Best, Michael
> 
> > On 2. Nov 2023, at 16:25, Sebastian Berg <
> > sebast...@sipsolutions.net> wrote:
> > Hi all,
> > 
> > just a heads up, the PR to change the default integer is merged on
> > main.  This may cause issues, especially with Cython code because
> > `np.int_t` cannot be reasonably defined anymore.
> > 
> > Other code may also want to vet usage of "long" in any variation. 
> > Much
> > code (like SciPy) simply supports any integer input, although even
> > there integer output may be relevant.  New NumPy defines
> > `NPY_DEFAULT_INT` to be able to branch at runtime for backward
> > compatiblity you could use:
> > 
> > #ifndef NPY_DEFAULT_INT
> > #define NPY_DEFAULT_INT NPY_LONG
> > #endif
> > 
> > Unfortunately, I expect this to be a bit painful, please let us
> > know if
> > it is too painful for some reason.
> > 
> > But OTOH it has been a recurring surprise and is a common reason
> > for
> > linux written software to not run on windows.
> > 
> > - Sebastian
> > 
> > ___
> > NumPy-Discussion mailing list -- numpy-discussion@python.org
> > To unsubscribe send an email to numpy-discussion-le...@python.org
> > https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
> > Member address: michael.sieber...@gmail.com
> ___
> NumPy-Discussion mailing list -- numpy-discussion@python.org
> To unsubscribe send an email to numpy-discussion-le...@python.org
> https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
> Member address: sebast...@sipsolutions.net


___
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Member address: arch...@mail-archive.com


[Numpy-discussion] Black style as applied to np.array(...) and the ruff formatter

2023-11-03 Thread Peter Cock via NumPy-Discussion
Hello all,

I imagine there are many people here using the black coding style as
implemented by the tool black, albeit with reservations about how it
lays out arrays by default (often therefore wrapped in a format off/on
block to exclude the array from automatic layout to allow for manual
column based layouts).

You may already be aware of the tool ruff as a fast alternative to flake8,
but it now has a formatter which implements the black format (with some
minor divergences):

https://astral.sh/blog/the-ruff-formatter

The authors are open to exploring special casing how it autoformats
arrays, and I think input now from the numpy community would be a
good idea:

https://github.com/astral-sh/ruff/discussions/8452

Kind regards,

Peter
___
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Member address: arch...@mail-archive.com