[Numpy-discussion] Re: Improved 2DFFT Approach

2024-03-05 Thread via NumPy-Discussion
Good evening, Ralf! I beg your pardon, for some reason I didn't get the notification of your response to this issue and couldn't answer in a more timely fashion. We'll cover all the mentioned points in shortest time possible (also some university and job projects) and I really appreciate such

[Numpy-discussion] Re: Improved 2DFFT Approach

2024-03-11 Thread via NumPy-Discussion
Good afternoon, Ralf. We have done some of the measurements you recommended, for your convenience we have created a separate folder with notebooks where we measured memory usage and performance of our interpretation against Scipy. Separately you can run the tests on your hardware and separately

[Numpy-discussion] Re: Improved 2DFFT Approach

2024-03-12 Thread via NumPy-Discussion
i appreciate your correction, indeed you are right, it was my fault. i changed everything and i believe it is in the correct order of things right now. our current best result is FFT: -46%(no multithreading, no type conversions) from scipy and +0.37% is the worst case (multithreaded, no type co

[Numpy-discussion] Assessment of the difficulty in porting CPU architecture for numpy

2023-11-16 Thread xuanbao via NumPy-Discussion
Hello everyone! I am working on implementing a tool to assess the complexity of CPU architecture porting. It primarily focuses on RISC-V architecture porting. In fact, the tool may have an average estimate of various architecture porting efforts.My focus is on the overall workload and difficulty

[Numpy-discussion] Need help in numpy building from source on windows.

2024-02-26 Thread rajoraganesh--- via NumPy-Discussion
detailed proble can be found at - https://stackoverflow.com/questions/78059816/issues-in-buildingnumpy-from-source-on-windows ___ NumPy-Discussion mailing list -- numpy-discussion@python.org To unsubscribe send an email to numpy-discussion-le...@python.o

[Numpy-discussion] Improved 2DFFT Approach

2024-02-27 Thread camrymanjr--- via NumPy-Discussion
Good day! My name is Alexander Levin. My colleague and I did a project on optimisation of two-dimensional Fourier transform algorithm six months ago. We took your implementation of numpy fft2d as a unit of quality. In the course of our research we found out that initially mathematically the

[Numpy-discussion] Re: JSON format for multi-dimensional data

2024-02-28 Thread fangqq--- via NumPy-Discussion
aside from the previously mentioned ticket https://github.com/numpy/numpy/issues/12481, I also made a similar proposal, posted in 2021 https://github.com/numpy/numpy/issues/20461 https://mail.python.org/archives/list/numpy-discussion@python.org/message/EVQW2PO64464JEN3RQXSCDP32RQDIQFW/ lightwe

[Numpy-discussion] Re: (no subject)

2024-04-23 Thread steven.kakaire--- via NumPy-Discussion
On 2024-04-19 07:20, Shreya Nalawade wrote: Dear Sir/Madam I want to contribute to the GSOD Numpy. Till when are the proposal accepted plus what should be the format of the proposals. Kindly guide me through the organisation policies and contribution guidelines. _

[Numpy-discussion] np.where and ZeroDivisionError: float division by zero

2024-04-25 Thread 840362492--- via NumPy-Discussion
0 In my code, I use the following calculation for a column in the dataframe: np.where(df_score['number'] ! = 0, 100 - ((100 * df_score[rank_column] -50)/df_score['number']), None),I have used df_score['number']! = 0, but the code is still wrong, ZeroDivisionError: float division by zero, even i

[Numpy-discussion] .npy MIME type?

2024-05-17 Thread None via NumPy-Discussion
Hi, As I wanted to have a textual preview of .npy files, I noticed that there is no support (partial support in magic, none in xdg-mime upstream), and simply no documented MIME type (official or not), for the .npy file format. Would it be reasonable to consider application/x-numpy (which is the

[Numpy-discussion] Windows 11 arm64 wheel

2024-07-11 Thread slobodan.miletic--- via NumPy-Discussion
Hi, I am writing on behalf of my team from Endava company. Our task is to work with opensource community, and setup multiple applications for use on win11 arm64 machines. One of the tasks is to understand the problems and if possible help NumPy team in setting up win11 arm64 compatible wheel on

[Numpy-discussion] Re: Windows 11 arm64 wheel

2024-07-12 Thread slobodan.miletic--- via NumPy-Discussion
We will start looking at the bug and the CI job. Thanks, Slobodan ___ 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.

[Numpy-discussion] Re: Windows 11 arm64 wheel

2024-08-12 Thread slobodan.miletic--- via NumPy-Discussion
As the bug fix is merged we are starting the investigation on the CI job. I have a few questions about this: 1) Are there some additional instructions for making and running the numpy CI jobs and cross compilation available in the documentation? 2) Do we need to have arm64 scipy-openblas released

[Numpy-discussion] Re: Windows 11 arm64 wheel

2024-09-03 Thread slobodan.miletic--- via NumPy-Discussion
Hi, I finished the first step and created the workflow for cross-compiling wheel without OpenBlas. PR for this can be found at: https://github.com/numpy/numpy/pull/27330 Output wheel is successfully installed and tested on the arm machine. After this gets merged I will continue with adding the

[Numpy-discussion] Looking for insights and Authors for some ideas

2023-03-02 Thread kritis--- via NumPy-Discussion
Hi All, Packt, an established publishing company (https://www.packtpub.com), is looking for authors to develop two books with the following working titles “Clean architecture in Python” and “Domain Driven Design in Python”. If this is something you would be interested to work on, please email m

[Numpy-discussion] update / revision suggest around f2py

2023-04-13 Thread nbehrnd--- via NumPy-Discussion
Dear maintainers of the documentation, Python numpy includes f2py to access functionality (and performance) of Fortran modules, which https://numpy.org/doc/stable/f2py/f2py.getting-started.html#the-smart-way aims to present. However, I was not able to successfully replicate fully either one o

[Numpy-discussion] Re: update / revision suggest around f2py

2023-04-14 Thread nbehrnd--- via NumPy-Discussion
Thank you, the issue is filed (https://github.com/numpy/numpy/issues/23592) as relevant to numpy's documentation. ___ NumPy-Discussion mailing list -- numpy-discussion@python.org To unsubscribe send an email to numpy-discussion-le...@python.org https://m

[Numpy-discussion] Installing numpy on an "unsupported" platform

2023-05-23 Thread asyropoulos--- via NumPy-Discussion
Hello, I am using Python 3.10.0 on OpenIndiana and yesterday I tried to install numpy in my system. The command /opt/gnu/python/bin/python3.10 -m pip install --user numpy failed and it it printed a long error report. The errors are of the form from numpy/core/src/umath/st

[Numpy-discussion] Re: mixed mode arithmetic

2023-07-09 Thread glaserj--- via NumPy-Discussion
Neal Becker wrote: > I've been browsing the numpy source. I'm wondering about mixed-mode > arithmetic on arrays. I believe the way numpy handles this is that it > never does mixed arithmetic, but instead converts arrays to a common type. > Arguably, that might be efficient for a mix of say, doub

[Numpy-discussion] Re: Endorsing SPECs 1, 6, 7, and 8

2024-10-08 Thread Nathan via NumPy-Discussion
Thanks for clarifying! In that case I think endorsing SPEC 7 makes sense. On Tue, Oct 8, 2024 at 3:08 PM Robert Kern wrote: > On Tue, Oct 8, 2024 at 8:36 AM Nathan via NumPy-Discussion < > numpy-discussion@python.org> wrote: > >> >> Since the legacy RNG interface

[Numpy-discussion] Re: Endorsing SPECs 1, 6, 7, and 8

2024-10-08 Thread Nathan via NumPy-Discussion
estions in the SPEC. On Tue, Oct 8, 2024 at 2:08 PM Joren Hammudoglu via NumPy-Discussion < numpy-discussion@python.org> wrote: > Is SPEC 1 thread-safe enough for py313+nogil? > ___ > NumPy-Discussion mailing list -- numpy-discussion@p

[Numpy-discussion] Re: What to do with np.matrix

2024-10-14 Thread Nathan via NumPy-Discussion
Here's a github code search for the string "np.matrix": https://github.com/search?q=%22np.matrix%22&type=code First, if you narrow down to just Python code, there are almost 60 thousand results, which is quite high, much higher than we we're comfortable with for outright removals for NumPy 2.0.

[Numpy-discussion] Re: Suggestion to show the shape in repr for summarized arrays

2024-10-30 Thread mattip via NumPy-Discussion
We discussed this again and will merge the current version in a few days unless there is more discussion. ___ NumPy-Discussion mailing list -- numpy-discussion@python.org To unsubscribe send an email to numpy-discussion-le...@python.org https://mail.pyth

[Numpy-discussion] Re: How do I use the numpy on spyder?

2024-10-31 Thread Alan via NumPy-Discussion
Nowadays, free AIs are good for such questions: https://www.youtube.com/watch?v=bA-tbHwvA6A hth On Thu, Oct 31, 2024 at 9:31 AM Joao Pereira via NumPy-Discussion < numpy-discussion@python.org> wrote: > I don´t know how to use the numpy on spyder. I have tried to use this > line: &

[Numpy-discussion] C API could be more consistent with returning NPY_SUCCEED/NPY_FAIL

2024-10-31 Thread sverre.hassing--- via NumPy-Discussion
While using the C API to work with Numpy arrays, I came across some inconsistencies regarding the return of a success state from various Numpy functions. For example, the array iterator functions return either NPY_SUCCEED (defined as 1) or NPY_FAIL (defined as 0) to indicate whether the function

[Numpy-discussion] (no subject)

2024-09-23 Thread slobodan.miletic--- via NumPy-Discussion
Hi, I made the second PR for full wheel with openblas. It is reviewed, but solution with openblas is not good enough, so I am investigating alternate options for cross compiling openblas. While I am working on this I have one question about the wheel without OpenBLAS. As the job is now created

[Numpy-discussion] Re: (no subject)

2024-09-24 Thread slobodan.miletic--- via NumPy-Discussion
Sorry for misunderstanding. I accidentally created this thread from Windows 11 arm64 wheel. That is also the reason why there is no subject. I will repost this to that discussion. It was not strictly openblas problem. I was trying to make the gh actions build for win11 arm64 numpy with openbla

[Numpy-discussion] Re: Windows 11 arm64 wheel

2024-09-24 Thread slobodan.miletic--- via NumPy-Discussion
I accidentally created new thread without subject with message that is belonging here: Hi, I made the second PR for full wheel with openblas. It is reviewed, but rejected as solution with linaro built openblas is not good enough, so I am investigating alternate options for cross compiling openb

[Numpy-discussion] Re: NumPy 2.2.0 Released

2024-12-08 Thread Nathan via NumPy-Discussion
love to hear more. On Sun, Dec 8, 2024 at 3:01 PM Neal Becker via NumPy-Discussion < numpy-discussion@python.org> wrote: > Where can I find more information on improvements to stringdtype? > > On Sun, Dec 8, 2024, 11:25 AM Charles R Harris via NumPy-Discussion < > numpy-

[Numpy-discussion] Proposing a flattening functionality for deeply nested lists in NumPy

2024-12-30 Thread Mark via NumPy-Discussion
Hello all, Many people have asked how to flatten a nested list into a one-dimensional list (e.g., see this StackOverflow thread ). While flattening a 2D list is relatively straightforward, deeply nested

[Numpy-discussion] ENH: Efficient vectorized sampling without replacement

2025-01-01 Thread Mark via NumPy-Discussion
Hello, Numpy provides efficient, vectorized methods for generating random samples of an array with replacement. However, it lacks similar functionality for sampling *without replacement* in a vectorized manner. To address this limitation, I developed a function capable of performing this task, ach

[Numpy-discussion] Re: Is a Python function a gufunc if it broadcasts its arguments appropriately?

2024-12-27 Thread john.a.dawson--- via NumPy-Discussion
Can gufuncs be written in Python? ___ 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..

[Numpy-discussion] Is a Python function a gufunc if it broadcasts its arguments appropriately?

2024-12-21 Thread john.a.dawson--- via NumPy-Discussion
For example, is the function `stack` below a gufunc with signature (),()->(2)? def stack(a, b): broadcasts = np.broadcast_arrays(a, b) return np.stack(broadcasts, axis=-1) Or must gufuncs be written in C? Or are other things required? ___ NumPy-

[Numpy-discussion] New GitHub issue UI

2025-01-14 Thread Nathan via NumPy-Discussion
Hi all, GitHub is rolling out the new UI for issues, which includes a lot of new opportunities to reorganize our backlog. More detail on the changelog blog: https://github.blog/changelog/2025-01-13-evolving-github-issues-public-preview/ In particular, there is now much richer support for tracking

[Numpy-discussion] Re: Is a Python function a gufunc if it broadcasts its arguments appropriately?

2024-12-31 Thread john.a.dawson--- via NumPy-Discussion
Is the function `stack` above a gufunc? ___ 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:

[Numpy-discussion] unique_2D

2024-12-24 Thread Mark via NumPy-Discussion
Hello, I've made a contribution to Numpy: unique_2D() which determines unique values and counts of a multi-dimensional array for each row (last dimension). As this is my first contribution, I expect some feedback before being added to the final version. The request can be found here: https://git

[Numpy-discussion] Beginners

2025-03-11 Thread Monkeysigh via NumPy-Discussion
Do you know if beginners are invited to attend? ___ 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 a

[Numpy-discussion] Re: Wondering if there is interest in a "variable convolution" feature in numpy?

2025-06-05 Thread cantor.duster--- via NumPy-Discussion
Thanks for the response, Nathan! I'll check in with SciPy. They have quite a few different convolution functions. Our backup is publishing this as a standalone package on PyPI and conda-forge. I wanted to see if it made sense to integrate it with something else first, though. Unfortunately

[Numpy-discussion] Wondering if there is interest in a "variable convolution" feature in numpy?

2025-06-04 Thread cantor.duster--- via NumPy-Discussion
Hello, My team and I (especially @Arqu1100) have been working on energy-dependent convolutions for a nuclear physics application: https://github.com/det-lab/energyDependentColvolve. We're looking to release this code either as a standalone library or as part of a library because we ran into qu

[Numpy-discussion] Re: Wondering if there is interest in a "variable convolution" feature in numpy?

2025-06-04 Thread Nathan via NumPy-Discussion
PyOpenSci guide, which has extensive guidance for writing and publishing packages for general consumption: https://www.pyopensci.org/python-package-guide/index.html On Wed, Jun 4, 2025 at 6:32 AM cantor.duster--- via NumPy-Discussion < numpy-discussion@python.org> wrote: > Hello, > &

[Numpy-discussion] Re: Addition of eigenvalue functions

2025-06-12 Thread Nathan via NumPy-Discussion
12, 2025 at 6:39 AM waqar jamali via NumPy-Discussion < numpy-discussion@python.org> wrote: > NumPy currently lacks a generalized eigenvalue function such as eig(A, B) > or polyeig(A, B). > > These functions are essential for several algorithms, including the > Criss-Cross

[Numpy-discussion] Re: Change in numpy.percentile

2023-10-11 Thread Peter Cock via NumPy-Discussion
On Tue, Oct 10, 2023 at 6:32 PM Matthew Brett wrote: > Hi, > > > On Tue, 10 Oct 2023 at 00:55, Andrew Nelson wrote: > > > > > > On Mon, 9 Oct 2023 at 23:50, Matthew Brett > wrote: > >> > >> Hi, > >> > >> On Mon, Oct 9, 2023 at 11:49 AM Andrew Nelson > wrote: > >> Could you say more about why y

[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 ba

[Numpy-discussion] How is "round to N decimal places" defined for binary floating point numbers?

2023-12-28 Thread Stefano Miccoli via NumPy-Discussion
I have always been puzzled about how to correctly define the python built-in `round(number, ndigits)` when `number` is a binary float and `ndigits` is greater than zero. Apparently CPython and numpy disagree: >>> round(2.765, 2) 2.77 >>> np.round(2.765, 2) 2.76 My

[Numpy-discussion] Re: How is "round to N decimal places" defined for binary floating point numbers?

2023-12-29 Thread Stefano Miccoli via NumPy-Discussion
Oscar Gustafsson wrote: > I would take it that round x to N radix-R digits means > round_to_integer(x * R**N)/R**N > (ignoring floating-point issues) Yes, this is the tried-and-true way: first define the function in exact arithmetic, then ask for the floating point implementation to return an ap

[Numpy-discussion] PyData yerevan chapter - sprint

2024-01-09 Thread Habet Madoyan via NumPy-Discussion
Dear community members, I am Habet, the co-founder and organizer of the PyData Yerevan chapter. We are planning to host a contributors' sprint for NumPy in Yerevan, Armenia, during one of our upcoming monthly meetups in either February or March. We have allocated a modest budget to facilitate the

[Numpy-discussion] Re: New Ruff rule for migrating to NumPy 2.0

2024-01-11 Thread Peter Cock via NumPy-Discussion
This looks handy - I used the following to try it: $ pip install -U ruff $ ruff --preview --select NPY201 --fix Happily nothing to address on the code baseI tried. Thanks, Peter On Thu, Jan 11, 2024 at 11:32 AM Mateusz Sokol wrote: > > Hi all! > > Some time ago we added a new rule to Ruff li

[Numpy-discussion] Re: welcome Raghuveer, Chris, Mateusz and Matt to the NumPy maintainers team

2024-01-27 Thread Hameer Abbasi via NumPy-Discussion
Welcome, Raghuveer, Chris, Mateusz and Matt! > Am 26.01.2024 um 21:04 schrieb Ralf Gommers : > > Hi all, > > We've got four new NumPy maintainers! Welcome to the team, and > congratulations to: > > - Raghuveer Devulapalli (https://github.com/r-devulap) > - Chris Sidebottom (https://github.com/

[Numpy-discussion] API: make numpy.lib._arraysetops.intersect1d work on multiple arrays #25688

2024-02-02 Thread Stephan Kuschel via NumPy-Discussion
Dear Community, For my own work, I required the intersect1d function to work on multiple arrays while returning the indices (using `return_indizes=True`). Consequently I changed the function in numpy and now I am seeking feedback from the community. This is the corresponding PR: https://gith

[Numpy-discussion] Re: API: make numpy.lib._arraysetops.intersect1d work on multiple arrays #25688

2024-02-06 Thread Stephan Kuschel via NumPy-Discussion
Dear Dom, thanks for bringing up the possible constriction. I agree that this would be serious argument against the change. However, as you said the overlapping/non-overlapping indices would become ambiguous with more than two arrays. And calling the fucntion with only two arrays at a time w

[Numpy-discussion] Re: API: make numpy.lib._arraysetops.intersect1d work on multiple arrays #25688

2024-02-06 Thread Stephan Kuschel via NumPy-Discussion
Dear Dom, just check, and on my computer the new version is ~factor 2 faster compared to the reduce approach if arrays are shuffled. For sorted arrays, the the new version is factor 3.4. faster: from functools import reduce idss = [np.random.permutation(np.arange(a*100, int(1e5)+a*100, 1)) f

[Numpy-discussion] Re: Introducing quarterly date units to datetime64 and timedelta64

2024-02-24 Thread Stefano Miccoli via NumPy-Discussion
Actually quarters (3 months sub-year groupings) are already supported as ‘M8[3M]’ and ‘m8[3M]’: >>> np.datetime64('2024-05').astype('M8[3M]') - np.datetime64('2020-03').astype('M8[3M]') numpy.timedelta64(17,'3M') So explicitly introducing a ‘Q’ time unit is only to enable more int

[Numpy-discussion] builing numpy on windows

2024-02-27 Thread Ganesh Rajora via NumPy-Discussion
Hi Team, I am Ganesh working for an MNC here in India and I am working on customised Python where I build set of python modules with python. I do not install them directly from web but I build each and everything from source code.  this is because security concerns at the organisation.  In simi

[Numpy-discussion] Re: Improved 2DFFT Approach

2024-03-12 Thread Alexander Levin via NumPy-Discussion
thanks for your extensive feedback. if i got you right, we can't state the outperformance in all cases, because it is measured by an insufficiently precise function and a relatively short period of time. I understand your point of view and thank you for your observation. we will start working o

[Numpy-discussion] Re: Improved 2DFFT Approach

2024-03-14 Thread Alexander Levin via NumPy-Discussion
Good day, Ralf. I am sharing the results of the latest updates on our code. We have taken into account the comments below and are testing the timing with %timeit -o inside jupyter, having information about the best of 7 code passes and the average deviation. Writing to summarise the intermediat

[Numpy-discussion] Re: Improved 2DFFT Approach

2024-03-14 Thread Alexander Levin via NumPy-Discussion
Hi Stefan, indeed you're right, the underlying formula initially was created by V. Tutatchikov for power-of-two matrices. The initial butterfly approach requires a recursive breakdown to 2x2 matrix in order to proceed with precalculations of roots of unity (exactly what provides you the aforem

[Numpy-discussion] Re: Improved 2DFFT Approach

2024-03-15 Thread Alexander Levin via NumPy-Discussion
Hi Stéfan, upd: indeed, rfft2 has equal memory usage with our fft2d in terms of reals. thanks, Stefan. to this moment, i believe the results are following: > scipy time outperformance on rectangular signals with sides of power-of-two. > equal memory usage with rfft2 in my eyes, it's worth

[Numpy-discussion] Accelerated NumPy with Weld compiler

2024-03-21 Thread Hemant Singh via NumPy-Discussion
Stanford and MIT jointly developed the Weld language and compiler to run NumPy and Pandas significantly faster, 10x-250x. My company has changed the compiler to be production ready. Anyone interested in trialing this compiler, please contact me with your work email. Best, Hemant ___

[Numpy-discussion] Should we add a NumPy default protocol version for np.save?

2024-05-07 Thread Chunqing Shan via NumPy-Discussion
Currently, when NumPy saves data using pickle, it hard-coded the protocol version to 3, which was the default value from Python 3.0 to Python 3.7. However, since Python 3.7 has reached its end-of-life (EOL), there are no actively maintained Python versions that default to using pickle protocol 3.

[Numpy-discussion] Adding bfill() to numpy.

2024-05-20 Thread Raquel Braunschweig via NumPy-Discussion
Hello everyone, My colleague and I will be opening a Pull Request (PR) about adding bfill() (backward fill) function to NumPy. This function is designed to fill NaN values in an array by propagating the next valid observation backward along a specified axis. We believe this addition will be hig

[Numpy-discussion] Re: Adding bfill() to numpy.

2024-05-22 Thread Raquel Braunschweig via NumPy-Discussion
Thank you for the suggestion. We will look into it! ___ 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/ Memb

[Numpy-discussion] Re: next Documentation team meeting at 7 PM UTC - New Time!

2024-06-17 Thread Kakaire Steven via NumPy-Discussion
On 2024-06-16 18:33, Mukulika Pahari wrote: Hi all, Our next Documentation Team meeting will happen on *Monday, June 17* at *7PM UTC*. ** I picked the new time trying my best to accommodate my and other's schedules (thanks to those who responded to the poll). Sorry to those who can't make t

[Numpy-discussion] Comparison between numpy scalars returns numpy bool class and not native python bool class

2024-06-27 Thread Stefano Miccoli via NumPy-Discussion
It is well known that ‘np.bool' is not interchangeable with python ‘bool’, and in fact 'issubclass(np.bool, bool)’ is false. On the contrary, numpy floats are subclassing python floats—'issubclass(np.float64, float) is true—so I’m wondering if the fact that scalar comparison returns a np.bool b

[Numpy-discussion] Re: Comparison between numpy scalars returns numpy bool class and not native python bool class

2024-06-28 Thread Stefano Miccoli via NumPy-Discussion
> On 27 Jun 2024, at 23:48, Aaron Meurer wrote: > > Apparently the reason this happens is that True, False, and None are > compared using 'is' in structural pattern matching (see Please let me stress that the ‘match/case’ snippet was only a concrete example of a situation in which, say ‘f(a)’

[Numpy-discussion] Re: Policy on AI-generated code

2024-07-03 Thread Loïc Estève via NumPy-Discussion
Hi, in scikit-learn, more of a FYI than some kind of policy (amongst other things it does not even mention explicitly "AI" and avoids the licence discussion), we recently added a note in our FAQ about "fully automated tools": https://github.com/scikit-learn/scikit-learn/pull/29287 From my persona

[Numpy-discussion] Accessing real and imaginary parts of npy_complex(nbits)

2024-07-08 Thread Brendan Murphy via NumPy-Discussion
Hi, This is my first look at the numpy internals, so I'm trying to help update pytensor to be compatible with numpy 2.0, and we have some structs that inherit from npy_complex64 and npy_complex128, which currently use .real and .imag to access real and imaginary parts. Assuming a 64 bit syste

[Numpy-discussion] Re: Accessing real and imaginary parts of npy_complex(nbits)

2024-07-09 Thread Brendan Murphy via NumPy-Discussion
I can partially answer my own questions here: 1) To avoid figuring out the type underlying npy_complex64 etc, the following macro seems to work: #define set_real(X, Y) _Generic((X), \ npy_cfloat: npy_csetrealf, \ npy_cdouble: npy_csetreal, \ np

[Numpy-discussion] Re: ENH: Uniform interface for accessing minimum or maximum value of a dtype

2024-08-27 Thread Hameer Abbasi via NumPy-Discussion
I’d advocate for something like a `DTypeInfo` object in the Array API itself, with `max_value` and `min_value` being members. Of course, one would have to imagine how this would work with complex-valued dtypes, but I’d like API that returns an object rather than a million different calls, simila

[Numpy-discussion] Re: Adding `P.coef_natural` property to polynomials

2024-09-01 Thread oc-spam66--- via NumPy-Discussion
I can summarize the different possibilities/proposals: (A) Create new properties: add a `P.coef_natural` property, with a suitable documentation ; maybe also add a `P.coef_internal` property. There would be no change to the existing code (only addition of properties). (B) Change `P.coef` attribut

[Numpy-discussion] Adding `P.coef_natural` property to polynomials

2024-08-31 Thread oc-spam66--- via NumPy-Discussion
Hello, I would like to add a property `P.coef_natural` to polynomials. Would you accept it? Reason: Most people who had ground courses on polynomials expect `P.coef` to return the natural coefficients. They face a huge confusion because this is not the case and because the `coef` attribute is n

[Numpy-discussion] Re: What should remain on PyPi

2024-09-03 Thread Peter Cock via NumPy-Discussion
If I recall correctly, people were building against the Numpy 2.0.0 release candidates in particular. In hindsight keeping those on PyPI might have been better. A formal NEP/SPEC seems a good idea. Peter On Tue, Sep 3, 2024 at 6:20 PM matti picus wrote: > I would prefer we never delete packages

[Numpy-discussion] next NumPy triage meeting - September 18th, 2024 at 18:00 UTC

2024-09-15 Thread Inessa Pawson via NumPy-Discussion
The next NumPy triage meeting will be held this Wednesday, September 18th at 18:00 UTC. This is a meeting where we synchronously triage prioritized PRs and issues. Join us via Zoom: https://numfocus-org.zoom.us/j/82096749952?pwd=MW9oUmtKQ1c3a2gydGk1RTdYUUVXZz09 . Everyone is welcome to attend and c

[Numpy-discussion] next NumPy Newcomers' Hour - September 19th, 2024 at 10 pm UTC

2024-09-16 Thread Inessa Pawson via NumPy-Discussion
Our next Newcomers' Hour will be held this Thursday, September 19th at 10 pm UTC. Stop by to ask questions, share your progress, celebrate success, or just to say hi. To add to the meeting agenda the topics you’d like to discuss, follow the link: https://hackmd.io/3f3otyyuTte3FU9y3QzsLg?both. Joi

[Numpy-discussion] Re: Adding `P.coef_natural` property to polynomials

2024-09-16 Thread oc-spam66--- via NumPy-Discussion
What do you mean by "changing the API"? - Case (A): Adding a property `P.coef_natural` is not a change IMO, it is an addition. - Case (B): Do you consider that changing `P.coef` from an attribute to a property is a change in the API ? It is transparent IMO. ___

[Numpy-discussion] Re: Invalid value encoutered : how to prevent numpy.where to do this?

2023-02-18 Thread Hameer Abbasi via NumPy-Discussion
Hi! You can use a context manager: with np.errstate(all=”ignore”): … Best regards, Hameer Abbasi Von meinem iPhone gesendet > Am 18.02.2023 um 16:00 schrieb David Pine : > > I agree. The problem can be avoided in a very inelegant way by turning > warnings off before calling where() and turnin

[Numpy-discussion] Re: removing NUMPY_EXPERIMENTAL_ARRAY_FUNCTION env var

2023-03-10 Thread Hameer Abbasi via NumPy-Discussion
+1 from my side as well.Von meinem iPhone gesendetAm 10.03.2023 um 19:10 schrieb Stephan Hoyer :+1 for removing this environment variable. It was never intended to stick around this long.On Fri, Mar 10, 2023 at 6:48 AM Ralf Gommers wrote:Hi all,In https://github.com/numpy/

[Numpy-discussion] PR-23061

2023-03-25 Thread Matteo Raso via NumPy-Discussion
I have an open PR that's been reviewed but keeps getting dropped. Specifically, I've had to make a comment asking for updates on the PR's status 3 times, with the last comment going ignored. I'm not upset, since I understand that the team is very busy (I actually looked through the archives a wh

[Numpy-discussion] Re: PR-23061

2023-03-25 Thread Peter Cock via NumPy-Discussion
On Sat, Mar 25, 2023 at 12:35 PM Matteo Raso via NumPy-Discussion wrote: > > P.S. I originally tried to send this message as an email, but it was instantly > rejected because I'm not a list member. That's a pretty serious error for a > public mailing list. That's ve

[Numpy-discussion] Re: Precision changes to sin/cos in the next release?

2023-05-31 Thread Stefano Miccoli via NumPy-Discussion
On 31 May 2023, at 16:32, numpy-discussion-requ...@python.org wrote: It seems fairly clear that with this recent change, the feeling is that the tradeoff is bad and that too much accuracy was lost, for not enough real-world gain. However, we now ha

[Numpy-discussion] Re: Precision changes to sin/cos in the next release?

2023-05-31 Thread Allan, Daniel via NumPy-Discussion
Thanks for your work on this, Sebastian. I think there is a benefit for new users and learners to have visually obviously-correct results for the identities. The SciPy Developer's Guide [1] several of us worked on last week uses Snell's Law as a teaching example, and it would now give some resu

[Numpy-discussion] Re: mixed mode arithmetic

2023-07-11 Thread Jens Glaser via NumPy-Discussion
Hi Matti, The documentation for numpy.dot currently states """ out ndarray, optional Output argument. This must have the exact kind that would be returned if it was not used. In particular, it must have the right type, must be C-contiguous, and its dtype must be the dtype that would be returned

[Numpy-discussion] [JOB] Astropy Research Software engineer

2023-08-04 Thread Aldcroft, Thomas via NumPy-Discussion
Astropy is hiring a Research Software engineer. We are looking for people who can spend 50-100% of their time on Astropy development in the next 6-9 months. Qualified candidates can range from software developers with open source experience to astronomy students with software experience. *If you

[Numpy-discussion] next NumPy triage meeting - October 16th, 2024 at 18:00 UTC

2024-10-12 Thread Inessa Pawson via NumPy-Discussion
The next NumPy triage meeting will be held this Wednesday, October 16th at 18:00 UTC. This is a meeting where we synchronously triage prioritized PRs and issues. Join us via Zoom: https://numfocus-org.zoom.us/j/82096749952?pwd=MW9oUmtKQ1c3a2gydGk1RTdYUUVXZz09 . Everyone is welcome to attend and con

[Numpy-discussion] Community Review #4 of the NumPy Comics

2024-10-14 Thread Mars Lee via NumPy-Discussion
Hi all, The “How to Contribute to NumPy” comics are open for review again! Since the last review, I have added the last 6 pages, back cover and credits section. Here’s the issue link: https://github.com/numpy/numpy/issues/27375 Here’s the comic link: https://heyzine.com/flip-book/3e66a13901.html

[Numpy-discussion] Re: What to do with np.matrix

2024-10-15 Thread Ralf Gommers via NumPy-Discussion
On Sat, Oct 12, 2024 at 6:23 PM Marten van Kerkwijk wrote: > Hi Dan, others, > > Great news that the sparse array implementation is getting there! > The continued existence of np.matrix has in large part been because of > sparse matrices, so in some sense the decision depends also on what > happe

[Numpy-discussion] Re: Endorsing SPECs 1, 6, 7, and 8

2024-10-08 Thread Robert Kern via NumPy-Discussion
On Tue, Oct 8, 2024 at 8:36 AM Nathan via NumPy-Discussion < numpy-discussion@python.org> wrote: > > Since the legacy RNG interface cannot be deprecated and we encourage > downstream to use it in tests according to the text of NEP 19, I'm not sure > about the text in

[Numpy-discussion] Expected behavior of np.array(..., copy=True)

2024-10-08 Thread Kevin Sheppard via NumPy-Discussion
Can anyone shed some light on the expected behavior of code using array(..., copy=True) with pandas objects? We ran into this in statsmodels and I think there are probably plenty of places where we explicitly call array(..., copy=True) and think we should have a totally independent copy of the data

[Numpy-discussion] next NumPy community meeting - October 9th, 2024 at 6 pm UTC

2024-10-06 Thread Inessa Pawson via NumPy-Discussion
The next NumPy community meeting will be held this Wednesday, October 9th at 18:00 UTC. Join us via Zoom: https://numfocus-org.zoom.us/j/83278611437?pwd=ekhoLzlHRjdWc0NOY2FQM0NPemdkZz09 . Everyone is welcome and encouraged to attend. To add to the meeting agenda the topics you’d like to discuss, fo

[Numpy-discussion] next NumPy Optimization Team meeting - October 7th, 2024 at 5 pm UTC

2024-10-04 Thread Inessa Pawson via NumPy-Discussion
The next NumPy Optimization Team meeting will be held this Monday, October 7th at 17:00 UTC. Join us via Zoom: https://numfocus-org.zoom.us/j/81261288210?pwd=iwV99tGSjR61RTGEERKM4QKxe46g1n.1 . Everyone is welcome and encouraged to attend. To add to the meeting agenda the topics you’d like to discus

[Numpy-discussion] Re: next Documentation team meeting

2024-10-06 Thread Mukulika Pahari via NumPy-Discussion
Hi all, Our next Documentation Team meeting will happen on *Monday, October 7* at *7PM UTC*. I will not be around for the next few docs meetings but they will continue to be hosted by other members. All are welcome - you don't need to already be a contributor to join. If you have questions or

[Numpy-discussion] Re: Endorsing SPECs 1, 6, 7, and 8

2024-10-07 Thread matti picus via NumPy-Discussion
It seems to me that we should only endorse SPECs that we ourselves implement, otherwise it is kind of "do as I say, not as I do". For instance, it would be strange to endorse SPEC0 but stay with NEP 29. If we are to endorse SPEC0 without changing our version end-of-life timing, we should at least m

[Numpy-discussion] help

2024-10-02 Thread Usha Gayatri via NumPy-Discussion
I am working on a Jupyter notebook in Anaconda Navigator. I have done some projects in 2021, 2022,2023 and 2024. When I run my old project which was created in 2021. it is giving errors.I am just testing import numpy as np import pandas as pd which is giving an error. File E:\anaconda3\Lib\site-pa

[Numpy-discussion] Re: What should remain on PyPi

2024-10-02 Thread Ralf Gommers via NumPy-Discussion
On Tue, Sep 3, 2024 at 7:53 PM Peter Cock via NumPy-Discussion < numpy-discussion@python.org> wrote: > If I recall correctly, people were building against the Numpy 2.0.0 > release candidates in particular. In hindsight keeping those on PyPI might > have been better. A formal N

[Numpy-discussion] Re: next Documentation team meeting

2024-10-20 Thread Mukulika Pahari via NumPy-Discussion
Hi all, Our next Documentation Team meeting will happen on *Monday, October 21* at *7PM UTC*. I will not be around for the next few docs meetings but they will continue to be hosted by other members. All are welcome - you don't need to already be a contributor to join. If you have questions or

[Numpy-discussion] np.ndenumerate doesn't obey mask?

2024-10-21 Thread Neal Becker via NumPy-Discussion
I was using ndenuerate with a masked array, and it seems that the mask is ignored. Is this true? If so, isn't that a bug? ___ NumPy-Discussion mailing list -- numpy-discussion@python.org To unsubscribe send an email to numpy-discussion-le...@python.org

[Numpy-discussion] Re: What to do with np.matrix

2024-10-20 Thread Ralf Gommers via NumPy-Discussion
On Sat, Oct 19, 2024 at 2:18 PM Dan Schult wrote: > This is quite helpful. Thanks! > > Github search: > I'm not surprised that many github hits are like homework problems. The > big resistance to removing np.matrix early on (~2008) came from educators > who wanted a Matrix oriented experience for

[Numpy-discussion] next NumPy community meeting - Wednesday, October 23rd, 2024 at 6 pm UTC

2024-10-20 Thread Inessa Pawson via NumPy-Discussion
The next NumPy community meeting will be held this Wednesday, October 23rd at 18:00 UTC. Join us via Zoom: https://numfocus-org.zoom.us/j/83278611437?pwd=ekhoLzlHRjdWc0NOY2FQM0NPemdkZz09 . Everyone is welcome and encouraged to attend. To add to the meeting agenda the topics you’d like to discuss, f

[Numpy-discussion] Re: Endorsing SPECs 1, 6, 7, and 8

2024-10-08 Thread Joren Hammudoglu via NumPy-Discussion
Is SPEC 1 thread-safe enough for py313+nogil? ___ 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 add

[Numpy-discussion] next NumPy triage meeting - October 30th, 2024 at 18:00 UTC

2024-10-29 Thread Inessa Pawson via NumPy-Discussion
The next NumPy triage meeting will be held this Wednesday, October 30th at 18:00 UTC. This is a meeting where we synchronously triage prioritized PRs and issues. Join us via Zoom: https://numfocus-org.zoom.us/j/82096749952?pwd=MW9oUmtKQ1c3a2gydGk1RTdYUUVXZz09 . Everyone is welcome to attend and con

[Numpy-discussion] next NumPy community meeting - Wednesday, November 6th, 2024 at 6 pm UTC

2024-11-03 Thread Inessa Pawson via NumPy-Discussion
The next NumPy community meeting will be held this Wednesday, November 6th at 18:00 UTC. Join us via Zoom: https://numfocus-org.zoom.us/j/83278611437?pwd=ekhoLzlHRjdWc0NOY2FQM0NPemdkZz09 . Everyone is welcome and encouraged to attend. To add to the meeting agenda the topics you’d like to discuss, f

  1   2   3   4   >