Skip to main content
Filter by
Sorted by
Tagged with
Advice
0 votes
8 replies
40 views

Suppose I have a function with the following signature: def f(x,**kwargs) Here, **kwargs are some optional arguments that may be passed to other functions called in the body of f. I want to apply ...
Quercus Robur's user avatar
1 vote
1 answer
48 views

I have a small Python code to read and save an image: import numpy as np # from scipy.misc import imread, imsave # Not working from imread import imread, imsave img = imread('tst-image.jpg') # print(...
Patrick TSHABA's user avatar
1 vote
1 answer
46 views

I am utilizing PyTorch for federated experiments. As my experiments involves 50 datasets with models, so, I have to run multiple ML models experiments parallelly. The code for training ML model is ...
Sultan Ahmed Sagor's user avatar
4 votes
1 answer
130 views

I am porting a vertical interpolation routine from Fortran 77 to NumPy. I am aiming for bit-for-bit parity (Mean Absolute Error (\approx 10^{-16})) with the gfortran output, which uses DOUBLE ...
gansub's user avatar
  • 1,224
4 votes
3 answers
149 views

For example, indices where arr is increasing for at least 4 values: arr = [4, 5, 6, 7, 2, 3, 4, 7, 8, 11, 2] func(arr, 4) # -> [0, 4] Is there some numpy-ish method for dealing with intervals of ...
Hugh Melee's user avatar
0 votes
1 answer
45 views

I am using the name matcher hmni for the first time. I am getting the error ImportError: cannot import name 'float' from 'numpy' (C:\Program Files\Python312\Lib\site-packages\numpy\__init__.py). Did ...
BoarGules's user avatar
  • 17.1k
1 vote
1 answer
83 views

I am working with a 3 axis gyroscope and I would like to integrate the rate data to find the orientation of my gyroscope as a function of time. The rate gyro measures the instantaneous rotation vector ...
Simon Tartakovksy's user avatar
0 votes
0 answers
109 views

I have a C++ library exposed as a python module which internally uses oneTBB. When compiling the library, I install the dependencies with it, including the oneTBB shared library. When I try to use the ...
jjcasmar's user avatar
  • 1,757
Advice
0 votes
5 replies
70 views

I am a Python developer, but I don't understand one thing: what are the numpy axis? Sometimes, when I use Sklearn, I have errors about axis. And I need explanations about values and reshape functions.
Fotosintez's user avatar
3 votes
1 answer
147 views

I want to find the eigenvalues of a symmetric matrix. When I do this in Python, I get an unbalanced diagonal matrix. The value of [0, 0] is much larger than the other eigenvalues. Is it wrong? How ...
Another.Chemist's user avatar
2 votes
3 answers
108 views

I have a 3D numerical array X, of shape=(N,N,6); and a 2D logical array mask, of shape=(N,N). I would like to find all unique 1D subarrays (length=6, along axis=2) of X, searching over the first two ...
ImagineBaggins's user avatar
-1 votes
1 answer
167 views

I have a problem where I have two arrays that can possibly have different shapes that I want to multiply together. Let's say I have two cases (I'm just using zeros right now cause all I care about is ...
Jehan Dastoor's user avatar
3 votes
1 answer
469 views

This is a simple question, but will be a little long so I can give all the context to what is happening. Essentially, this is a code question/issue and the physical context behind is just to ...
Silvio sjsj's user avatar
0 votes
1 answer
65 views

I would like to disable the AltGr + M shortcut in Spyder. Currently, it opens a "Numpy array helper" but I would rather be able to insert the µ character as I'm often dealing with units ...
Mika R.'s user avatar
  • 53
5 votes
4 answers
211 views

I am trying to check how many elements in one numpy array can be found, with a certain tolerance, inside another numpy array. For now I have been using a for loop to apply my comparison logic, however,...
Minivip89's user avatar

15 30 50 per page
1
2 3 4 5
7686