I'm using numpy to work with a time series that has a number of bad_values=-9999.0 . For example:
vals = [3., 352., -32.0e-3, -9999.0, 35., -9999.0]
I have a number of different conditions that the ...

You have to run it in the folder with a couple images and run shuffle_all_images() and it will create new folder and randomly generate all of the values for each pixel. I think it has to do with not ...

I'm using NetworkX (version 1.5) from a Python (2.6.5) application to convert a DiGraph object (72,000 nodes) to a Numpy (version 1.3) matrix. I don't have exact numbers or a code sample (I'm working ...

having more than a million numbers stored in np.array. These are straight binary codes and I need to convert them into appropriate two's complement.
I'm using actually map of a converting function to ...

Certain odd things are casted by pandas to dates instead of NaT. For example pd.to_datetime(['1M']) or pd.to_datetime(['Monday']) returns dates instead of NaT or an array of objects. is there a way to ...

I have a selection of values coming from an experiment and I want to drop some of the lines with respect to other lines. Meaning: I measure a field, a polarization and an error of the polarization. ...

My university project consists of taking a clean corpus of sound data in .wav form, adding Gaussian noise using numpy.random.normal, saving it then using an rfft function which I would like to plot in ...

Numpy supports a lot of in-place operations with its *=, /=, +=, -=, etc. operations, but what about an operation that doesn't have such a form, like x = f(x), where f is just some T->T function, and ...

I have a numpy array representing a jpg, not as file. Therefore I have to directly process the array. I want to save these data into a file so that I can watch it with a usual jpg viewer. Usually I ...

I have a Pandas dataframe which is stored as an 'object', but I need to change the dataframe structure to an 'int' as the 'object' dtype will not process in the kmeans() function of numpy library
I ...

Is it possible to optimize/vectorize the code below? Right now it doesn't seem like a proper way of doing things and it's not very 'pythonish'. The code is intended to work with enormous sets of data ...

In order to use scipy in abaqus 6.14 I need to compile it outside.
So, I've installed the same abaqus' python version (2.7.3 64bits).
I've found a numpy+mkl binary (I don't know if its thrustworth) ...

I'm trying to segment the vector y using edges in cutoffs using numpy (and only numpy). y and g are defined as column vectors, but a is returned as row vector. Running g += a.transpose() generates a ...

I want to do array indexing. I would have expected the result to be [0,1,1,0], however I just get an error. How can I do this type of indexing?
a_np_array=np.array(['a','b','c','d'])
print a_np_array ...

I installed simple CV using simple cv superpack that i downloaded from simple cv website.Then i tried to run the Hello World program provided in the same website.
My system runs windows 7 32 bit and i ...

I am creating a numpy array between two limits with a step size of 0.005 using numpy.arange. Normally I would expect the output to go up to but not include the stop point. For example, I am using the ...

I'm a bit new to python and I have to write a function for class. It receives a numpy array and searches through it for certain integers. I use doctests to test the return values from the function and ...

I have a numpy array like below, which has three columns, col.1 is the distance, col. 2 and 3 are the id of the nodes. I want to find the minimum distance from the 1st column but only for node id 0.
...