numpy
How to "scale" a numpy array?
I would开发者_开发技巧 like to scale an array of shape (h, w) by a factor of n, resulting in an array of shape (h*n, w*n), with the.[详细]
2023-04-06 17:39 分类:问答Save .dta files in python
I\'m wonderin开发者_开发知识库g if anyone knows a Python package that allows you to save numpy arrays/recarrays in the .dta format of the statistical data analysis software Stata. This would really sp[详细]
2023-04-06 17:14 分类:问答How to reference numpy array objects?
I have numpy array: >>> data dtype([(\'date\', \'|O4\'), (\'value\', \'<f8\')] where date ob开发者_运维问答ject is Python datetime.date object which consists of all days in one year:[20[详细]
2023-04-06 13:15 分类:问答Matrix multiplication for sparse matrices in Python
I want to multiply a sparse matrix A, with a matrix B which has 0, -1, or 1 as elements. To reduce the complexity of the matrix multiplication, I can ignore items if they are 0, or go ahead and add th[详细]
2023-04-06 12:57 分类:问答Equivalent of named tuple in NumPy?
Is it possible to create a NumPy object that behaves very much like a c开发者_如何转开发ollections.namedtuple, in the sense that elements can be accessed like so:[详细]
2023-04-06 10:02 分类:问答How to convert Python dictionary object to numpy array
I have python dict object with key as datetime.date object and values as tuple objects: >>> data_d开发者_StackOverflowict[详细]
2023-04-06 09:26 分类:问答How to multiply a scalar throughout a specific column within a NumPy array?
I need to do some analysis on a large dataset from a hydrolgeology field work. I am using NumPy. I want to know how I can:[详细]
2023-04-06 09:00 分类:问答matplotlib.pcolor very slow. alternatives?
I want to plot a 2D array (roughly 1000x1000) with the values corresponding to a color scale. So I used matplotlib.pcolor, which did just that but for some reason it is super slow when it gets to thos[详细]
2023-04-06 08:33 分类:问答how to get correct order of the image when converted to numpy array?
I am reading the image from the disk and I am converting it to a numpy array im=Image.open(infile) i开发者_如何学运维mdata = scipy.misc.fromimage(im)[详细]
2023-04-06 08:18 分类:问答Remove column of array via indexing in Python
I\'m trying to remove an observation in an array via indexing.What I h开发者_开发知识库ave is:[详细]
2023-04-06 03:22 分类:问答