numpy Questions

3

I want to create .exe file from .py. If I run .py file it works well and I have no problem with it. But when I run .exe file created by pyinstaller I can not input(type) anything in command line. ...
Masuria asked 23/10, 2019 at 13:9

3

Solved

I wanted to display an image from a NumPy array, but I got this error: Traceback (most recent call last): File "E:/wittos/python/SVM/witti svm/arraytoimage.py", line 14, in <module> imag...
Outstanding asked 29/12, 2018 at 12:18

3

Solved

I just want to get a list or dict from dtype out of a numpy array. Thought it would be a easy but it is not itterable. I looked other places but could not find answer. jn is a recarray [OrderedDi...
Fornof asked 14/2, 2014 at 10:42

2

Solved

I have array of size (3, 3, 19, 19), which I applied flatten to get array of size 3249. I had to write these values to file along with some other data, so I did following to get the array in strin...
Chinkapin asked 2/7, 2018 at 21:47

3

Solved

I'm having a bit of trouble with fitting a curve to some data, but can't work out where I am going wrong. In the past I have done this with numpy.linalg.lstsq for exponential functions and scipy.op...
Dismiss asked 16/1, 2013 at 0:57

2

I want to save training in a different folder named Check. How can I save this using np.save command? I read about np.save command from documentation but it doesn't describe how to save it in diffe...
Nina asked 2/5, 2017 at 6:29

3

Lets say I have two arrays: a = numpy.array([1,2,3,4,5]) b = numpy.array([10,11,12]) I wish to add these arrays together, but I wish to start at index 3 in the first array, to produce: numpy.array...
Amick asked 8/8 at 10:14

6

Solved

I am trying to find patterns in a numpy array, called values. I'd like to return the starting index position of the pattern. I know I could iterative over each element and check whether that elemen...
Feudality asked 27/2, 2017 at 17:23

3

Lets say I have 3 Numpy arrays, A1,A2,A3, and 3 floats, c1,c2,c3 and I'd like to evaluate B = A1*c1 + A2*c2+ A3*c3. Will Numpy compute it like the below example? E1 = A1*c1 E2 = A2*c2 E3 = A3*c3...
Untidy asked 30/5, 2010 at 5:33

3

Solved

Is there a way to avoid using specific values when applying sum and mean in numpy? I'd like to avoid, for instance, the -999 value when calculating the result. In [14]: c = np.matrix([[4., 2.],[4...
Coachandfour asked 4/7, 2017 at 19:55

2

I'm trying to import the xarray module into python 3.8.10 but I get this error: AttributeError: module 'numpy.random' has no attribute 'BitGenerator' In order to allow you to reproduce the error: ...
Dermatoplasty asked 8/3, 2022 at 17:27

3

Solved

I am trying to port some code from MATLAB to Python and I am getting much slower performance from Python. I am not very good at Python coding, so any advise to speed these up will be much appreciat...
Quarrel asked 27/6, 2023 at 18:41

3

ERROR: Could not find a version that satisfies the requirement scipy==1.7.1 (from versions: 0.8.0, 0.9.0, 0.10.0, 0.10.1, 0.11.0, 0.12.0, 0.12.1, 0.13.0, 0.13.1, 0.13.2, 0.13.3, 0.14.0, 0.14.1, 0.1...
Biggers asked 25/9, 2021 at 8:32

3

Solved

I am working with very large (several GB) 2-dimensional square NumPy arrays. Given an input array a, for each element, I would like to find the direction of its largest adjacent neighbor. I am usin...
Priam asked 24/8 at 0:46

2

I have the following values, each of which is a scalar of type double: a1, a2, a3, a4, a5. I tried to concatenate them using Numpy, as follows: f = np.concatenate((a1,a2,a3,a4,a5)) I however get t...
Diversity asked 27/1, 2018 at 0:15

2

Solved

I have a 1D numpy numpy array with integers, where I want to replace zeros with the previous non-zero value if and only if the next non-zero value is the same. For example, an array of: in: x = n...
Euratom asked 14/1, 2018 at 16:3

14

Solved

I have wrote the following code: import matplotlib.pyplot as plt import numpy as np x = np.linspace(0, 5, 100) y = x**2 plt.plot(x, y) plt.xlabel("X-axis") plt.ylabel("Y-axis")...
Famished asked 1/12, 2021 at 12:51

7

Solved

I am running a simple CNN using Pytorch for some audio classification on my Raspberry Pi 4 on Python 3.9.2 (64-bit). For the audio manipulation needed I am using librosa. librosa depends on the num...
Dental asked 31/3, 2022 at 8:11

7

Solved

I have an array of points in unknown dimensional space, such as: data=numpy.array( [[ 115, 241, 314], [ 153, 413, 144], [ 535, 2986, 41445]]) and I would like to find the average euclidean dista...
Phosphorite asked 5/3, 2010 at 0:3

2

I've been given the challenge to code np.argmin without numpy . I've been thinking hard for about a day.. I have no idea whether I should use a for statement, an if statement, a while statement, or...
Pigweed asked 8/1, 2022 at 10:33

2

Solved

I'm trying to simulate a simple diffusion based on Fick's 2nd law. from pylab import * import numpy as np gridpoints = 128 def profile(x): range = 2. straggle = .1576 dose = 1 return dose/(s...

2

I am trying to enable multithreading/multiprocessing in an Anaconda installation of Numpy. My test program is the following: import os import numpy as np from timeit import timeit size = 1024 A = ...
Dorso asked 28/11, 2022 at 16:4

5

Solved

Below is a python script that calculates the homography between two images and then map a desired point from one image to another import cv2 import numpy as np if __name__ == '__main__' : # Re...
Depriest asked 2/7, 2020 at 11:53

1

Solve_ivp is an initial value problem solver function from Scipy. In a few words scipy.integrate.solve_ivp(fun, t_span, y0, method=’RK45’, t_eval=None, dense_output=False, events=None, vectorized=...
Frazier asked 18/2, 2020 at 9:48

3

Solved

I have data that has 800,000+ rows. I want to take an Exponential Moving Average (EMA) of one of the columns. The times are not evenly sampled and I want to decay the EMA on each update (row). The ...
Mendy asked 9/7, 2019 at 16:19

© 2022 - 2024 — McMap. All rights reserved.