[Numpy-discussion] Re: An article on numpy data types (Lev Maximov)

2022-01-01 Thread Lev Maximov
Dear Mark, They are GitHub and Medium ('friend link'). Best regards, Lev On Sun, Jan 2, 2022 at 9:43

[Numpy-discussion] Re: An article on numpy data types (Lev Maximov)

2022-01-01 Thread Dr. Mark Alexander Mikofski PhD
Dear Lev, thanks for this! Can you please post links to the GitHub & Medium articles? Sorry for my ignorance. Best Regards! Mark On Saturday, January 1, 2022, Lev Maximov wrote: > I've dual-published the article on github and medium under the title 'A > comprehensive guide to NumPy data types'.

[Numpy-discussion] Re: An article on numpy data types (Lev Maximov)

2022-01-01 Thread Lev Maximov
I've dual-published the article on github and medium under the title 'A comprehensive guide to NumPy data types'. Thank you all for your help and happy New Year! Best regards, Lev On Sun, Jan 2, 2022 at 12:31 AM Stefano Miccoli wrote: > First of all, happy new 2022 UTC year! > > Let my add

[Numpy-discussion] Re: An article on numpy data types (Lev Maximov)

2022-01-01 Thread Stefano Miccoli
First of all, happy new 2022 UTC year! Let my add just a very brief note to this discussion: I opened https://github.com/numpy/numpy/issues/20675 which addresses the shortcomings of the current documentation, which is in my opinion not sufficiently

[Numpy-discussion] Re: An article on numpy data types

2021-12-30 Thread Lev Maximov
On Fri, Dec 31, 2021 at 12:12 AM Charles R Harris wrote: > > > On Thu, Dec 30, 2021 at 4:12 AM Lev Maximov wrote: > >> On Wed, Dec 29, 2021 at 9:59 AM Charles R Harris < >> charlesr.har...@gmail.com> wrote: >> >>> On Tue, Dec 28, 2021 at 2:54 PM Warren Weckesser < >>>

[Numpy-discussion] Re: An article on numpy data types

2021-12-30 Thread Charles R Harris
On Thu, Dec 30, 2021 at 4:12 AM Lev Maximov wrote: > On Wed, Dec 29, 2021 at 9:59 AM Charles R Harris < > charlesr.har...@gmail.com> wrote: > >> On Tue, Dec 28, 2021 at 2:54 PM Warren Weckesser < >> warren.weckes...@gmail.com> wrote: >> >>> On 12/28/21, Lev Maximov wrote: >>> > On Tue, Dec 28,

[Numpy-discussion] Re: An article on numpy data types

2021-12-30 Thread Lev Maximov
On Wed, Dec 29, 2021 at 9:59 AM Charles R Harris wrote: > On Tue, Dec 28, 2021 at 2:54 PM Warren Weckesser < > warren.weckes...@gmail.com> wrote: > >> On 12/28/21, Lev Maximov wrote: >> > On Tue, Dec 28, 2021 at 3:43 PM Evgeni Burovski >> > >> > wrote: >> > >> >> Very nice overview! >> >> >>

[Numpy-discussion] Re: An article on numpy data types

2021-12-28 Thread Charles R Harris
On Tue, Dec 28, 2021 at 2:54 PM Warren Weckesser wrote: > On 12/28/21, Lev Maximov wrote: > > On Tue, Dec 28, 2021 at 3:43 PM Evgeni Burovski > > > > wrote: > > > >> Very nice overview! > >> > >> One question and one suggestion: > >> > >> 1. Is integer wraparound guaranteed for signed ints, or

[Numpy-discussion] Re: An article on numpy data types

2021-12-28 Thread Eric Firing
On 2021/12/28 10:54 AM, Lev Maximov wrote: On Wed, Dec 29, 2021 at 12:45 AM Eric Firing > wrote: On 2021/12/27 10:09 PM, Lev Maximov wrote: > Btw, does it make sense to include the masked arrays? I know Pandas uses > something > like a masked

[Numpy-discussion] Re: An article on numpy data types

2021-12-28 Thread Warren Weckesser
On 12/28/21, Lev Maximov wrote: > On Tue, Dec 28, 2021 at 3:43 PM Evgeni Burovski > > wrote: > >> Very nice overview! >> >> One question and one suggestion: >> >> 1. Is integer wraparound guaranteed for signed ints, or is it an >> implementation detail? For unsigned ints, sure, it's straight

[Numpy-discussion] Re: An article on numpy data types

2021-12-28 Thread Brock Mendel
pandas does not use np.ma internally. On Tue, Dec 28, 2021 at 12:56 PM Lev Maximov wrote: > On Wed, Dec 29, 2021 at 12:45 AM Eric Firing wrote: > >> On 2021/12/27 10:09 PM, Lev Maximov wrote: >> > Btw, does it make sense to include the masked arrays? I know Pandas >> uses >> > something >> >

[Numpy-discussion] Re: An article on numpy data types

2021-12-28 Thread Lev Maximov
On Wed, Dec 29, 2021 at 12:45 AM Eric Firing wrote: > On 2021/12/27 10:09 PM, Lev Maximov wrote: > > Btw, does it make sense to include the masked arrays? I know Pandas uses > > something > > like a masked array for representing null values in the integer columns. > > Does anyone use > > NumPy

[Numpy-discussion] Re: An article on numpy data types

2021-12-28 Thread Lev Maximov
On Tue, Dec 28, 2021 at 3:43 PM Evgeni Burovski wrote: > Very nice overview! > > One question and one suggestion: > > 1. Is integer wraparound guaranteed for signed ints, or is it an > implementation detail? For unsigned ints, sure, it's straight from a C > standard; what about signed types

[Numpy-discussion] Re: An article on numpy data types

2021-12-28 Thread Lev Maximov
On Tue, Dec 28, 2021 at 9:12 PM Stefano Miccoli wrote: Hi Stefano, > Nice overview! > Thanks! > Of course the first sentence should be “leap years”, which leads to my > main point. > Sure, I've already fixed this one, it just hasn't found its way online yet. > It makes no sense to claim

[Numpy-discussion] Re: An article on numpy data types

2021-12-28 Thread Eric Firing
On 2021/12/27 10:09 PM, Lev Maximov wrote: Btw, does it make sense to include the masked arrays? I know Pandas uses something like a masked array for representing null values in the integer columns. Does anyone use NumPy masked arrays nowadays? Yes, numpy masked arrays are very much in use,

[Numpy-discussion] Re: An article on numpy data types

2021-12-28 Thread Stefano Miccoli
Nice overview! In my opinion section 5. Datetimes could benefit from some clarifications, and contains a couple of typos. Let me start with the typos. I read "As in pure python, np.datetime64 is accompained by np.timedelta64 (stored as a single np.uint64) with the expectable arithmetic

[Numpy-discussion] Re: An article on numpy data types

2021-12-28 Thread Evgeni Burovski
Very nice overview! One question and one suggestion: 1. Is integer wraparound guaranteed for signed ints, or is it an implementation detail? For unsigned ints, sure, it's straight from a C standard; what about signed types however. 2. It'd be nice to explicitly stress that dtype=float

[Numpy-discussion] Re: An article on numpy data types

2021-12-28 Thread Lev Maximov
>I think timedelta64 is missing. Is that intentional? Yes, thank you! It has stuck in my todo list. Still thinking on the best way to include it. Btw, does it make sense to include the masked arrays? I know Pandas uses something like a masked array for representing null values in the integer

[Numpy-discussion] Re: An article on numpy data types

2021-12-27 Thread Eric Firing
On 2021/12/27 9:32 AM, Lev Maximov wrote: > I'm surprised no one has mentioned it already: int and uint are reversed in the first table. Not anymore! I know I'm susceptible to this type of blunders ) Thank you for your kind attention! I've made a few more fixes here and there and added a

[Numpy-discussion] Re: An article on numpy data types

2021-12-27 Thread Lev Maximov
> I'm surprised no one has mentioned it already: int and uint are reversed in the first table. Not anymore! I know I'm susceptible to this type of blunders ) Thank you for your kind attention! I've made a few more fixes here and there and added a couple of illustrations. Looks more or less

[Numpy-discussion] Re: An article on numpy data types

2021-12-26 Thread Juan Nunez-Iglesias
I'm surprised no one has mentioned it already: int and uint are reversed in the first table. I do agree with others that this is a great overview page that should be included in the numpy docs. Thanks Lev! Juan. On Sun, 26 Dec 2021, at 12:59 PM, Lev Maximov wrote: > I've tried to take into

[Numpy-discussion] Re: An article on numpy data types

2021-12-26 Thread Lev Maximov
I've tried to take into account all the suggestions from this thread. https://axil.github.io/numpy-data-types.html shows new version now and

[Numpy-discussion] Re: An article on numpy data types

2021-12-26 Thread Lev Maximov
Python 3.9.7 (tags/v3.9.7:1016ef3, Aug 30 2021, 20:19:38) [MSC v.1929 64 bit (AMD64)] on win32 ^^ this is relevant this is not Type "help", "copyright", "credits" or "license" for more information. >>> import numpy as np >>> np.int_ On Sun, Dec

[Numpy-discussion] Re: An article on numpy data types

2021-12-26 Thread Michael Siebert
Okay, little modification to my last mail: many Android smartphones are still 32 bit, but according to https://www.androidauthority.com/arm-32-vs-64-bit-explained-1232065/ from 2023 on, all (or at least many) new ARM processors will be 64 bit only. Apple‘s iPhone 64 bit only since quite a

[Numpy-discussion] Re: An article on numpy data types

2021-12-26 Thread Michael Siebert
Hi Matti, hi Lev, that‘s cool there are numbers on Python usage! According to those, Windows might still be around quite a while. Would be interesting to include options like „Windows (native)“ and „Windows (WSL)“ for future surveys. Windows is the main operating system I‘m working with most

[Numpy-discussion] Re: An article on numpy data types

2021-12-26 Thread Lev Maximov
Hi Michael, > Python on Windows is and is supposed to be, as far as I get it, a dying platform. I would join Matti in thinking that it is a misconception. Have you heard of the enormous daily updated unofficial repository of the binary windows

[Numpy-discussion] Re: An article on numpy data types

2021-12-26 Thread Matti Picus
On 26/12/21 3:44 pm, Michael Siebert wrote: Hey Lev, I‘ve forgotten to mention my MacBook M1, it‘s also int64 there. Python on Windows is and is supposed to be, as far as I get it, a dying platform. Your statement is the first time I have heard this. Of those who answered the 2020 Python

[Numpy-discussion] Re: An article on numpy data types

2021-12-26 Thread Lev Maximov
Hi, Friedrich > There seems to be missing an "a" before "more". Thank you. Fixed. This is a draft. It will be (more or less) professionally proofread thereafter. > on my machine it runs:: Which OS does your machine run on? > FloatingPointError written instead of RuntimeWarning This is most

[Numpy-discussion] Re: An article on numpy data types

2021-12-26 Thread Michael Siebert
Hey Lev, I‘ve forgotten to mention my MacBook M1, it‘s also int64 there. Python on Windows is and is supposed to be, as far as I get it, a dying platform. A billion things are broken there (HDF comes to my mind) and it seems even Microsoft wants developers to move away from native Windows with

[Numpy-discussion] Re: An article on numpy data types

2021-12-26 Thread Friedrich Romstedt
Am Sa., 25. Dez. 2021 um 10:03 Uhr schrieb Lev Maximov : > > https://axil.github.io/numpy-data-types.html > Speaking of zero-dimensional arrays more realistic example where you can run > into them is when you iterate over a numpy array with nditer: There seems to be missing an "a" before

[Numpy-discussion] Re: An article on numpy data types

2021-12-26 Thread Lev Maximov
Dear Michael, Thank you for your feedback! I've fixed the x86_64 typo. I'll think how to reformulate the int32 part. I work on debian x86_64 and windows 10 64bit. Constructing an array with np.array([1,2,3]) as well as np.array([1,2,3], dtype=np.int_) gives me int64 dtype on linux, and int32 on

[Numpy-discussion] Re: An article on numpy data types

2021-12-26 Thread Michael Siebert
Dear Lev, thank you a lot! Something like this should be part of the Numpy documentation. I like the diagram, looks very nice! Also, I’ve opened an issue regarding data types https://github.com/numpy/numpy/issues/20662 Some feedback from my side: