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

2024-04-25 Thread Fang Zhang
The function np.where just chooses elements from two arrays that are both computed before np.where is even executed. See this StackOverflow answer https://stackoverflow.com/a/29950752/4681187 if you want to suppress the error. On Thu, Apr 25, 2024 at 8:16 PM 840362492--- via NumPy-Discussion < num

[Numpy-discussion] Re: New feature

2024-04-25 Thread Alexei Lisitsa
Ok, thanks package stand alone I did but how I advertise it? Maybe you as expert can say some thing that is needed , something to develop I want some new experience чт, 25 апр. 2024 г., 23:30 Matti Picus : > On 25/04/2024 23:16, Alexei Lisitsa wrote: > > > Waiting for answer > > > What kind of an

[Numpy-discussion] Re: New feature

2024-04-25 Thread Matti Picus
On 25/04/2024 23:16, Alexei Lisitsa wrote: Waiting for answer What kind of answer would you like? I took a look at numpy_list[0] and if it serves your needs, that is great, but I don't think such ndarray generation routines should be added to NumPy until they become more commonly known, us

[Numpy-discussion] Re: New feature

2024-04-25 Thread Alexei Lisitsa
Waiting for answer ___ 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.

[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