I have Python 3 virtualenv set up @ 4.15.0-23-lowlatency #25-Ubuntu. Inside virtualenv I have numpy1.14 installed. I want to install numpy1.11. I get the error:
I'm writing a teaching document that uses lots of examples of Python code and includes the resulting numeric output. I'm working from inside IPython and a lot
I am dealing with a CNN and I get the following error on the line loss = criterion(outputs, data_y): Here is the relevant code snippet: def run(model, X_train,
I'm trying to use pip to uninstall numpy(I also installed pandas, but I seem to have been able to uninstall that). In the case of `numpy, I get the following ou
I would like to create a new numpy array by repeating each item in another array by a given number of times (n). I am currently doing this with a for loop and .
I installed opencv and numpy using pip on debian 11.2 with python 3.9. In visual studio the modules aren't available and terminal returns: Traceback (most recen
I am trying to write code which generates a sound file based on a series of frequencies I give it, but I have reached a point where compiling the arrays of inte
So I have defined the following function to be entered into a class: MatrixConverter(arr) Which works exactly how I want it to, taking in a numpy array as argu
Given a CuPy array a, there are two ways to get a numpy array from it: a.get() and cupy.asnumpy(a). Is there any practical difference between them? import cupy
I am trying to extract values of an AIFF sound file to do some processing (FFT, frequency content, filter modeling, etc.). I have used AIFC to extract the para
I needed to run some parts of the code in GPU using cupy instead of numpy. So, I only made comment out for this line # import numpy as np and used this line ins
I am trying to extract values of an AIFF sound file to do some processing (FFT, frequency content, filter modeling, etc.). I have used AIFC to extract the para
I have a 3x1 point vector representing the start point of some line, and a 3x1 point vector representing the end of some line. I would like to sample an arbitra
I am trying to plot Cassini ovals in Python using these parametric equations for x,y. https://mathcurve.com/courbes2d.gb/cassini/cassini.shtml Here is my progra
I'm working with lists in Python. I have a list of colleagues which is colleagues=['Jack', 'Jessica' 'John', 'Mark', 'Mary', 'Paul'] I want to calculate all po
I am trying to port my code from Matlab to Python. Most of it seems to work except Matlab's function wrapToPi I am using numpy's unwrap function np.unwrap
I am trying to run a script importing numpy, and it shows this error: Traceback (most recent call last): File "C:/Users/<user>/pycharm/<my_project>
I think that the x,y,z order is more intuitive for a 3D array, just as Matlab does. For example, If someone tells me an array is 2x3x4, I will think it is 2 row
I have two arrays with pixels, I need to replace the first part of array 'pixels_new', to array 'pixels_old' pixels_old = numpy.asarray(im) #picture 100X100 pix
I'm looking for rows in B which are close to any of the rows in A example: eps = 0.1 A = [[1.22, 1.33], [1.45, 1.66]] B = [[1.25, 1.34], [1.77, 1.66], [1.44, 1.