# LaVOZs

The World’s Largest Online Community for Developers

'; Newest 'numpy' Questions - LavOzs.Com

# Questions tagged [numpy]

NumPy is a scientific and numerical computing extension to the Python programming language.

• ### can i solve a non-linear eigen value problem with fsolve in python?

i have a an eigenvalue problem of non linear type c_0 + lambda*c_1 + lambda^2*c_2 + c_3*lambda^3=0 i've been trying by inversing the matrix of coefficients c, but is a singular matrix, it will ...
• ### Failed to install numpy

I tried to install numpy by pip install numpy on a remote machine, where I got these Errors: Running setup.py install for numpy ... error ERROR: Command errored out with exit status 1: ...
• ### combining two numpy arrays of different dtype to a structured array

I have a numpy float array and an int array of the same length. I would like to concatenate them such that the output has the composite dtype (float, int). column_stacking them together just yields a ...
• ### What does this Python code snippet mean exactly?

So I've been trying to teach myself image processing with OpenCV and found this code snippet. I could implement it into my code and I know what it is approximately doing, but what exactly is it doing? ...
• ### Concatenate two numpy arrays so that index order keeps the same?

Assume I have two numpy arrays as follows: {0: array([ 2, 4, 8, 9, 12], dtype=int64), 1: array([ 1, 3, 5], dtype=int64)} Now I want to replace each array with the ID at the front, i.e. the values in ...
• ### Recursive value in Dataframe

I have something that has been bugging me for a while. I have a Dataframe, looking like this: Amount Balance Date Text 90 -442.378339 5000 2018-02-...
• ### How to set first value in numpy array that meets a condition to 1 but not the rest

I want to set the max value in a numpy array equal to 1, and the rest of the values to 0, so that there is only one value equal to 1 in the new array. Right now I'm doing this with: new_arr = np....
• ### Get Dictionary Keys From NumPy Array and Values From Increment

I have a large NumPy array (with 100,000,000 elements) that has unique and sorted values. The array may be generated with inefficiently with something like this (it will eat up your memory since the ...
• ### python numpy : ValueError: shapes (14,) and (404,14) not aligned: 14 (dim 0) != 404 (dim 0)

I'm trying to implement Locally reweighed least square and I'm getting this b = np.array([np.sum(weights.T.dot(y_train.T)), np.sum(weights.T.dot(y_train.T).dot(x_train))]) ValueError: shapes (14,) ...
• ### Pivot-table in pandas: aggfunc sum during date range

I have a pandas dataframe like the following: # Date Name RG #----------------------------------- # 1: 2013-04-25 NameA 1 # 2: 2013-04-25 NameB 3 # 3: ...
• ### How does Tensorflow 2.0 AutoGraph handle numpy operation?

Apparently TF2.0 Autograph works with Numpy operations I wrote a simple example below and I use autograph.to_code to see what Autograph does with the Numpy operation. The ag__.converted_call seems ...
• ### Adding a number to certain elements of an array

I have an array in numpy: [1 2 3] [4 5 6] [7 8 9] [10 11 12] I would like to add 100 to all values that are greater than or equal to 3 and less than or equal to 8. How can I do this?
• ### Modify pandas dataframe for different format [duplicate]

I have a pandas dataframe like the following: # Date Name RG #----------------------------------- # 1: 2013-04-25 NameA 1 # 2: 2013-04-25 NameB 3 # 3: ...
• ### Rank of a dot product of a matrix and its transpose, is not the same of the rank of the matrix itself using numpy linalg

Description The rank of the dot product of a matrix M, for example, is supposed to equal the rank of the matrix M itself. But in my case, for a 3*N (N is in [1,10]) matrix M with elements are all ...
• ### Fourier transform of finite signal in python

I want to to compute the (discrete) Fourier transform using numpy.fft of a finite time series. The Fourier transform takes place over a finite time interval. One can specify the length of this time ...