Skip to main content
Filter by
Sorted by
Tagged with
5 votes
1 answer
95 views

I have trouble understanding this section of the docs: https://numpy.org/devdocs//reference/simd/build-options.html#targeting-older-cpus In the default build of numpy, cpu-baseline is set to min. In ...
Sebastian Schmidt's user avatar
0 votes
0 answers
101 views

My Question: I am trying to run an acoustic program with Python. I have encountered an error in the file while executing "pip install arlpy". I am using the instructions from the following ...
user21764386's user avatar
0 votes
0 answers
92 views

I am running a Kaggle notebook with a T4 GPU with the following code: %%capture !pip uninstall -y transformers datasets accelerate peft huggingface_hub bitsandbytes sentence-transformers faiss-gpu !...
Nivedhith Jayeshanker's user avatar
14 votes
1 answer
694 views

It doesn’t make sense to me. It looks like nonzero(arr != 0) just creates an intermediate array, allocating more memory. No way it is faster, otherwise why doesn’t NumPy optimize it? But here is my ...
Mr. W's user avatar
  • 407
0 votes
0 answers
96 views

I am looking to get the precise top line of an object to later compare sensor data of an encoder that will travel over this object. import pyvista as pv import numpy as np PATH = r"Foam.stl"...
kucb's user avatar
  • 37
0 votes
1 answer
112 views

I use Linux to learn reinforcement learning, but found that something went wrong with different versions of Numpy and Python... My old project uses python=3.7, numpy=1.18.2 and that's OK. However, ...
Xingrui Zhuang's user avatar
Advice
1 vote
2 replies
55 views

In [251]: x.shape Out[251]: (388240, 15, 8) In [252]: y.shape Out[252]: (66, 15, 8) I'd like to treat x and y as ⊆ 𝓜(15, 8) and x[i], y[i] for the purposes of set operations such as isin. Or in ...
Philippe's user avatar
  • 2,136
3 votes
1 answer
139 views

To construct a histogram, we have an array of bins and a data array, find in which bins the data go, and count the number of elements in each bin. I would like something similar but more general, ...
Quercus Robur's user avatar
4 votes
1 answer
123 views

Using Python, I want to display a scalar distribution defined over a sphere, and visualize it with a Mollweide projection. The issue I'm dealing with is the discontinuity caused by the projection. ...
Pitchoune's user avatar
  • 143
4 votes
1 answer
179 views

P = y.T @ (np.diag(Wc) @ y) This line is creating increased memory usage for me in the below code on my Windows 11 machine. As soon as I run the code, I see the RAM usage increasing and skyrocketing. ...
you_know_who's user avatar
1 vote
2 answers
112 views

I need a function that behave like np.random.choice, but that takes the argument "p" to be a 2-dimension array, of which each row is a probability. The function should return a sample from ...
Liathan's user avatar
  • 13
4 votes
2 answers
86 views

I have been extensively using numpy arrays recently, and have discovered that what I used to do with meshgrids could be done with smaller 1D arrays: import numpy as np def myfun(x,y): return np....
cgui's user avatar
  • 43
3 votes
0 answers
87 views

I am encountering a version mismatch issue with numpy in a specific Conda environment (speciesnet). The Symptoms: When I run conda install numpy=1.24.3, Conda tells me: # All requested packages ...
WWW's user avatar
  • 33
2 votes
1 answer
87 views

I try to convert the colour.difference.delta_E_CIE2000 method from numpy in a built-in math function, since the colour-science package (while great) is just overkill for my purpose. I checked the ...
Thingamabobs's user avatar
  • 8,264
5 votes
2 answers
159 views

I am writing some Python type stubs for a package, and I have run into a function that can take either a list or, if numpy is available, a numpy.ndarray. If numpy is present and the function is given ...
Isaac E.'s user avatar

15 30 50 per page
1
2 3 4 5
7686