[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: representation of valid float type range

2022-01-01 Thread Klaus Zimmermann
Hi Lev, all, your explanation makes perfect sense, but shouldn't this be considered a bug in `linspace`? Best Klaus On 29/12/2021 18:15, Lev Maximov wrote: • Short answer: It's because >>> f64_info.max - f64_info.min inf • Long answer: linspace(a,b,n) tries to calculate the step by

[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] NumPy 1.22.0 has been released

2022-01-01 Thread Charles R Harris
Hi All, On behalf of the NumPy team, I'm pleased to announce the release of NumPy 1.22.0. NumPy 1.22.0 is a big release featuring the work of 153 contributors spread over 609 pull requests. There have been many improvements, highlights are: - Annotations of the main namespace are essentially

[Numpy-discussion] Proposal to add method for string slicing to np.char

2022-01-01 Thread Joseph Fox-Rabinovitz
I made a PR for another new method `np.char.slice_` here: https://github.com/numpy/numpy/pull/20694 Here is an excerpt of the PR message: There are numerous examples of string slicing being a fairly requested feature: - https://stackoverflow.com/q/70547027/2988730 -

[Numpy-discussion] Re: Proposal for new function to determine if a float contains an integer

2022-01-01 Thread Joseph Fox-Rabinovitz
Stefano, That is an excellent point. Just to make sure I understand, would an interface like `is_integer(a, int_dtype=None)` be satisfactory? That way, there are no bounds by default (call it python integer bounds), but the user can specify a limited type at will. An alternative would be

[Numpy-discussion] Re: Proposal for new function to determine if a float contains an integer

2022-01-01 Thread Stefano Miccoli
I would rather suggest .is_integer(integer_dtype) signature because knowing that 1e300 is an integer is not very useful in the numpy world, since this integer number is not representable as a numpy.integer dtype. Note that in python assert not f.is_integer() or int(f) == f never fails