List « numpy « Python Data Type Q&A

Home
Python Data Type Q&A
1.array
2.date
3.dictionary
4.Format
5.integer
6.List
7.numpy
8.regex
9.string
10.tuple
Python Data Type Q&A » numpy » List 

1. Why NumPy instead of Python lists?    stackoverflow.com

Is it worth my learning NumPy? I have approximately 100 financial markets series, and I am going to create a cube array of 100x100x100 = 1 million cells. I will ...

2. Would you use numpy if you were just manipulating a list of binary binary values?    stackoverflow.com

Is there any advantage to using numpy when you're doing a large number of operations on lists of binary values? How about integers within a small range (like just the ...

3. Define dTypes in NumPy using a list?    stackoverflow.com

I just am having a problem with NumPy dtypes. Essentially I'm trying to create a table that looks like the following (and then save it using rec2csv):

     ...

4. Numpy vectorize, using lists as arguments    stackoverflow.com

The numpy vectorize function is useful, but it doesn't behave well when the function arguments are lists rather then scalars. As an example:

import numpy as np

def f(x, A):
    ...

5. increasing speed of python list operations and comparisons in a custom table class    stackoverflow.com

so, I'm using the following class to create a table and I need to find a way to not only make it faster but make interactions with it faster

class Table(object):
  ...

6. Python: Get item from list based on input    stackoverflow.com

I appreciate this may not be directly possible so I would be interested how you would go about solving this problem for a general case. I have a list item that looks ...

7. fastest way to arrange data in python numpy based on list    stackoverflow.com

I have problem in arrange data in numpy example a have list of data range :

numpy.array([1,3,5,4,6])
and I have data :
numpy.array([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])
and I need the data to be arrange to
numpy.array([

[1,9999,9999,9999,9999,9999,9999]

[2,3,4,9999,9999,9999]

[5,6,7,8,9,9999]

[10,11,12,13,9999,9999]

[14,15,16,17,18,19]

])
I thought it's a ...

8. Numpy.Array in Python list?    stackoverflow.com

I've got a list (used as a stack) of numpy arrays. Now I want to check if an array is already in the list. Had it been tuples for instance, I ...

9. Boost.python overloaded constructor for numpy array and python list    stackoverflow.com

Given a C++ class exposed with Boost.Python, how do I expose two constructors:

  • one that takes a numpy array, and
  • another that takes a python list?

10. Check if numpy array present in list    stackoverflow.com

Possible Duplicate:
Numpy.Array in Python list?
If I have a list of numpy.arrays like this
a = [ numpy.array([1,2]), numpy.array([2, 3]), numpy.array([12,155])]
how can I check if specified ...

11. How to save a list as numpy array in python?    stackoverflow.com

I need to know if it is possible to save a python list as a numPy array.

12. Merging a list of numpy arrays into one array (fast)    stackoverflow.com

what would be the fastest way to merge a list of numpy arrays into one array if one knows the length of the list and the size of the arrays, which ...

13. Is it possible to use numpy.argmax with a custom field of objects in a list?    stackoverflow.com

Something like:

class Test:
    def __init__(self, n):
        self.id = n

    def __str__(self):
        ...

14. Create a python class that is treated as a list, but with more features?    stackoverflow.com

I have a class called dataList. It is basically a list with some metadata---myDataList.data contains the (numpy) list itself, myDataList.tag contains a description, etc. I would like to be able to ...

15. How to create a dynamic array    stackoverflow.com

As I know, list type in Python is a dynamic pointer array, which will increase it's capacity when items are appended to it. And array in NumPy uses a continuous memory ...

16. How to compute the similarity between lists of features?    stackoverflow.com

I have users and resources. Each resource is described by a set of features and each user is related to a different set of resources. In my particular case, the resources ...

17. Python List of np arrays to array    stackoverflow.com

I'm trying to turn a list of 2d numpy arrays into a 2d numpy array. For example,

dat_list = []
for i in range(10):
    dat_list.append(np.zeros([5, 10]))
What I would ...

18. Flatten list of lists in Python with non-iterable types?    stackoverflow.com

Possible Duplicate:
Flatten (an irregular) list of lists in Python
I've seen quite a few 'How to flatten list of lists' questions on SO, but I'm ...

19. How Do I create a list from numpy array?    stackoverflow.com

How do I get numpy array into python list? looking for ('foo', 1, 2, 3, 4) series is a numpy array

symbol = 'foo'

def rowp (symbol,series):
         ...

20. Splitting arrays python    stackoverflow.com

I have a 2D array in Python either a normal one or a numpy array with dimensions (150, 5), I wish to split it into two arrays of dimensions (150, 3) ...

21. Average duplicate values from two paired lists in Python using NumPy    stackoverflow.com

In the past I have faced myself dealing with averaging two paired lists and I have used the answers provided there successfully. However with large (more than 20,000) items the procedure ...

22. Python: Split numpy array    stackoverflow.com

I have an array produced by numpy which looks as follows:

[ 54.51399994 -12.10200024 -11.88099957]
[ 56.23899841 -8.30799961 -2.03500009]
How do i convert this to a list? ...

23. Calculating Correlation Coefficient with Numpy    stackoverflow.com

I have a list of values and a 1-d numpy array, and I would like to calculate the correlation coefficient using numpy.corrcoef(x,y,rowvar=0). I get the following error:

Traceback (most recent call last):
File ...

24. Numpy array to list    python-forum.org

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.