[Numpy-discussion] NumPy 1.24.x branched

2022-11-22 Thread Charles R Harris
Hi All,

NumPy 1.24.x has been branched.

Chuck
___
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] Re: Add a new CI provider for aarch64, macos arm64, musl

2022-11-22 Thread Stefan van der Walt
Hi Matti,

On Mon, Nov 21, 2022, at 06:20, Matti Picus wrote:
> I am writing to the list for visibility: I opened an issue [0] about 
> adding the Cirrus CI provider to take over some of the CI task runners 
> from travis.com. We have been experiencing strange timeouts on the 
> travis runs, and in general the platform does not feel stable. SciPy 
> made the transition about two months ago and seem to be satisfied.
>
> Thoughts?

I don't see why not. Increased stability, slower reduction of Travis credits, 
better CI runtime through implicit parallelization. Besides, it's easy enough 
to go back.

Stéfan
___
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] Add a new inf whose data type is int

2022-11-22 Thread 2601536569
Hi, I am a student and I have very little knowledge about python and numpy, so 
my suggestion may seem really stupid.
One day I was use numpy to implement Floyd algorithm and then I found the data 
type of np.inf is float, so i can not use min or max function because other 
data type are int. So I wonder whether you can add a new inf whose data type is 
int. Thanks
___
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] Re: Add a new inf whose data type is int

2022-11-22 Thread Jim Pivarski
If you need an identity for minimization and maximization, a number "I_max"
for which "max(I_max, x) == x" and "I_min" for which "min(I_min, x) == x",
you could use the extreme values of the given integer type.

For instance, if your integer type is np.int64, use

   - I_max = np.iinfo(np.int64).min (which is -9223372036854775808)
   - I_min = np.iinfo(np.int64).max (which is 9223372036854775807).

These numbers are effectively like negative infinity and positive infinity
for the np.int64 integer type because there is no integer value less than
or greater than them, respectively, just as -np.inf and np.inf are the
extreme values of np.float64. (Be explicit in your choice between np.int32
and np.int64, though!)

If these extreme (and ugly-looking) values are the output of your
algorithm, you could catch them and replace them with something else.

But there's no possibility of introducing infinite values to the integer
types because the NumPy numeric types correspond to numeric types in
hardware, which haven't changed in many decades. Every 64 bit-pattern in
np.int64 corresponds to some integer; there's no room to add a new one. It
would have to be a whole new integer type, with different mathematical
rules than hardware instructions provide (so, emulated in software).

I'm not a member of the NumPy team—I'm only asserting the above because I'm
guessing with 99.% certainty that this is what they'd say.

Cheers,
-- Jim



On Tue, Nov 22, 2022 at 5:24 PM <2601536...@qq.com> wrote:

> Hi, I am a student and I have very little knowledge about python and
> numpy, so my suggestion may seem really stupid.
> One day I was use numpy to implement Floyd algorithm and then I found the
> data type of np.inf is float, so i can not use min or max function because
> other data type are int. So I wonder whether you can add a new inf whose
> data type is int. Thanks
> ___
> 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: jpivar...@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: arch...@mail-archive.com