Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
16 views

I'm trying to perform a Gaussian Process Regression on the following series of data points (X and Y): X Y 0.00001 -6.8200000000000003 0.00014 -6.8073846153846160 0.00042 -6.6818333333333326 ...
Josep's user avatar
  • 1
2 votes
1 answer
27 views

I have downloaded the HEALPix5 DECaPS 3D dust extinction map (from arXiv:2503.02657) and imported it as a numpy array meanmap. The array gives an expected result (51415400, 1, 120) to the meanmap....
Peter Barnes's user avatar
3 votes
3 answers
104 views

I have a black box function baseball that determines the magnitude of the distance that a baseball travels when launched. It takes the initial speed, the angle of launch and the initial spin. Assuming ...
panji's user avatar
  • 47
1 vote
0 answers
59 views

I’m computing peristimulus time histograms (PSTHs) in Python. Each trial aligns spikes to a reach-start timestamp and bins them into fixed-width bins. I see vertical “gaps” (low counts) at exact bin ...
May Ren's user avatar
  • 11
-4 votes
0 answers
54 views

I am trying to install and import numpy on my Mac but in the terminal of Pycharm, it comes up with a error message as shown below. I am a relatively new coder in python so I am extremely confused. ...
confused and tired's user avatar
Best practices
1 vote
1 replies
88 views

I am implementing cosine similarity to my vector database using python and numpy. I would like to know if I should loop through every database entry and find the cosine similarity or is there a way of ...
user20617578's user avatar
Advice
0 votes
4 replies
61 views

Evening, Is there any way to find a specific sequence of numerical values, matching certain logic (in the same way as in a regex), within a numpy/torch array or matrix row? I know i could just convert ...
Ghost's user avatar
  • 1,594
3 votes
2 answers
128 views

Having this kind of pandas dataframe df = pd.DataFrame({ 'ts_diff':[0, 0, 738, 20, 29, 61, 42, 18, 62, 41, 42, 0, 0, 729, 43, 59, 42, 61, 44, 36, 61, 61, 42, 18, 62, 41, 42, 0, 0] }) ts_diff - is ...
ihtus's user avatar
  • 2,863
2 votes
2 answers
120 views

I make a web app, the server side is running Python and processes data with numpy. I want to display charts from the numpy data on the browser. On the server I encode a list of numpy arrays with ...
mguijarr's user avatar
  • 8,030
1 vote
0 answers
156 views

I am regressing Y~(X1, X2) such that this fit is perfect (R squared is 1), where the R squared for Y~X1 and Y~X2 are chosen somewhere in the interval $(0,1)$. I am trying to create the numerical ...
turtlesandwich's user avatar
-5 votes
0 answers
57 views

I recently upgraded to Python 3.14. This caused the below weird output in my dataframe: Stock Price ATM Theta Return Roll Avg 0 SOFI np.float64(29.68) np....
Shawn Duffy's user avatar
4 votes
3 answers
116 views

What is an efficient numpy way of achieving an array of results based on a pair of index datasets? So, lets say there are 2 arrays these are the row and column headers in the table underneath: a = [1,...
ShaunMc's user avatar
  • 93
1 vote
1 answer
65 views

I have a directory of ca. 1600 PNGs (1000x400 res. previews of frames) and want to generate an EDL so I do not have to render the same frame several times. So far, I have successfully run the ...
Rain's user avatar
  • 21
3 votes
1 answer
139 views

Related post: Compile numpy WITHOUT Intel MKL/BLAS/ATLAS/LAPACK Recent versions of numpy use meson for build configuration, I can build numpy from source but failed to exclude BLAS/LAPACK/... deps. ...
nochenon's user avatar
  • 376
2 votes
1 answer
90 views

Consider the example code: from functools import partial from jax import jit import jax.numpy as jnp @partial(jit, static_argnums=(0,)) def my_function(n): idx = jnp.tile(jnp.arange(n, dtype=int)...
Ben's user avatar
  • 539
1 vote
2 answers
104 views

I scan for a trigger and when I get it, load a .npy file and process it. It started to take almost 2 seconds to load the NumPy file from within the process but when I tried to load the same file from ...
user2037777's user avatar
1 vote
1 answer
91 views

I have a TIFF file with a size of (48000, 432000) and I would like to upload only a piece of the image, for example, pass a parameter like (X, Y, wid, hei), where X, Y are the coordinates of the upper-...
senek's user avatar
  • 85
-4 votes
1 answer
116 views

Today I wanted to use the following command to subset a numpy high-dimensional array, but was surprised to find that the two methods were completely different. I'm very curious why numpy reorders the ...
samll fat's user avatar
1 vote
1 answer
95 views

I have two DataFrames, data1 and data2, with 3-level multiindices. The first two levels are floats, and correspond to spatial coordinates (say longitude and latitude). The third level, time, is based ...
peich's user avatar
  • 33
5 votes
1 answer
194 views

I'm encountering a strange RuntimeWarning: divide by zero encountered in matmul when performing a simple matrix multiplication on my new Apple M4 machine. The most peculiar part is that this warning ...
Md. Mursalatul Islam Pallob's user avatar
4 votes
2 answers
198 views

I've been trying to parallelize some code that I wrote in python. The actual work is embarrassingly parallel, but I don't have much experience with multiprocessing in Python. The actual code I'm ...
user2506833's user avatar
2 votes
1 answer
106 views

If I know the shape of a numpy array like (1000, 50), and I have an arbitrary selection expressed as an IndexExpression, let's say np.s_[:200, :], how can I evaluate the shape of the sliced array (in ...
Kyle's user avatar
  • 364
2 votes
2 answers
119 views

I am performing some tests on the normality of the numpy random generator. Running the following code, the stats.normaltest shows some seeds with low pvalue (which highlights non-normal distribution). ...
GAP's user avatar
  • 113
1 vote
2 answers
240 views

I've tried to put in the NumPy scientific notation function in different places but that didn't work, other than that I haven't been able to find anything that works def optimal_resistor(name="&...
riley britchford's user avatar
0 votes
1 answer
116 views

I am plotting multiple violin plots for a large dataset and it takes so long to generate one figure. I would like to save the violin plotting objects as npy or npz, and plot them separately. Is this ...
Redshoe's user avatar
  • 301

1
2 3 4 5
2306