0
votes
0answers
25 views

Error while installing numpy in venv

I am getting the following error while trying to install numpy in my venv. I am running centos. which python points to the python in my venv directory (venv)bash-3.2$ pip install numpy ...
1
vote
1answer
45 views

Numpy reshape yields a different size error

I have a piece of Python code which has been used for about a year without any issues (it reads, uncompresses/unpacks data, selects a window and plots it using Numpy/Matplotplib). We recently got a ...
0
votes
0answers
48 views

ZeroDivisionError: float division by zero

I've isolated a problem in my script that is occurring due to this attempt at a standard deviation calculation using scipy's .tstd function, sp.stats.tstd(IR) where my IR value is 0.0979. Is there ...
0
votes
1answer
63 views

gradient descent using python and numpy ,machine learning

def gradient(X_norm,y,theta,alpha,m,n,num_it): temp=np.array(np.zeros_like(theta,float)) for i in range(0,num_it): h=np.dot(X_norm,theta) #temp[j]=theta[j]-(alpha/m)*( np.sum( ...
1
vote
1answer
22 views

Numpy indexing with a one dimensional boolean array

This post here is similar, but it does not answer my question since I am working with a one dimensional boolean array. I am attempting to recreate the following boolean indexing feature in Octave. ...
0
votes
0answers
21 views

Does numpy.ma allow masking of sub-masked arrays in a masked array?

I am writing some code in Python 2.7 (using pydev in eclipse, Mac OSX) to gather information about a big set of card information stored in xml files. The cards are from Magic the gathering and all ...
0
votes
0answers
51 views

Cannot perform task in python loop

I am matching ID fields from two csv files by a date and location code, both files look like this (with different IDs, of course): ID code date 543 452 '1/4/2009' 543 452 '1/8/2009' 543 ...
4
votes
4answers
55 views

How do I combine two numpy arrays element wise in python?

I have two numpy arrays: A = np.array([1, 3, 5, 7]) B = np.array([2, 4, 6, 8]) and I want to get the following from combining the two: C = [1, 2, 3, 4, 5, 6, 7, 8] I'm able to get something ...
1
vote
1answer
32 views

2D Histogram from a 3x3 array in PYTHON

This might sound trivial, but I am unable find a solution in PYTHON. No problem in ROOT or MATLAB. So, I have a 3x3 array, and I would like each element in the array to represent the height ...
3
votes
1answer
66 views

Split numpy array by unique values in column

I have a large array that I imported from a csv (np.recfromcsv) that I want to divide into smaller arrays by an ID column in said array. For example my array(a) looks like: [(842, 129826, 2018, 7246, ...
1
vote
1answer
53 views

pyqtgraph compile to executable file fails

I want to create an executable file from pyqtgraph, finally I tried this tutorial http://www.pyqtgraph.org/Bundling%20applications%20with%20PyQtGraph_R16.pdf After the first run of the compiled ...
1
vote
1answer
38 views

how to create an interlaced rows images with python and openCv

I have two images with the same size. I would like to create a new interlaced image where the odd rows belong to one image and the even rows to the other image. Like a 3d image. I am trying to do that ...
3
votes
1answer
62 views

Does NumPy has a function to reduce fractions?

For example, when I calculate 98/42 I want to get 7/3, not 2.3333333, is there a function for that?
1
vote
1answer
41 views

Python: Populate lower triangle matrix from a list

I have discrete-time data of airline ticket availability in csv format. This is used to represent ticket availability for a combination of departure and arrival time windows. Say my day is divided ...
1
vote
1answer
67 views

Difference between Numpy and Numpy-MKL?

I wanted to test some signal processing and statistics using SciPy. So I had to use scipy.signal and scipy.stats, but I always used to get an error: ImportError: DLL load failed: The specified module ...

1 2 3 4 5 15
15 30 50 per page