Skip to content
murmot

Results for “python numpy array example problem error code download site:mail.python.org”

  • mail.python.org

    [Numpy-discussion] np.fromstring and Python 3

    The following example illustrates a problem I'm encountering a problem with the np.fromstring function in Python 3The array 'a' should have the same size as 'string' since I'm using a 1-byte datatype. Is this a bug, or do I need to change the way I use this function in Python 3?

  • mail.python.org

    [Numpy-discussion] NEP 32: Remove the financial ... - Python

    Implementation -------------- * Create a new Python package, ``numpy_financial``, to be maintained in the top-level NumPy github organization. This repository will contain the definitions and unit tests for the financial functions.

  • mail.python.org

    mail.python.org

    If I change the `LOCAL_IF` variable to a **non-localhost** interface on my computer, **this works correctly** and sends the example data. So this is somehow linked to the localhost address being used to send.

  • mail.python.org

    [C++-sig] numpy.ndarray did not match PyArrayObject *?

    I wrapped a c++ code which need accept numpy.ndarray as argument. > Here numpy.version='1.0rc1'. > And to the best of my knowledge, numpy.ndarray's c type is PyArrayObject. > > But why when I run it, it reports type did not match? > >

  • mail.python.org

    [Tutor] Importing file data into Python arrays

    May 27, 2002 · The array module, documented at http://python.org/doc/current/lib/module-array.html might be of interest to you anyway, as well as the numeric python extensions at http://www.pfdubois.com/numpy/ . > However, when I try to read in data from a file as shown below, I > end up with the lines, which I can't manipulate.

  • mail.python.org

    [Numpy-discussion] ValueError: objects are not aligned

    Previous message (by thread): [Numpy-discussion] ValueError: objects are not aligned.examples are in docstring for np.cov >. as for "stacking rf1 rf1 into a single array first" how would I do this? >>> np.column_stack([np.arange(3)[:,None], np.arange(3)[:,None]]) array([[0, 0]

  • mail.python.org

    [Tutor] Memory error - how to manage large data sets?

    Jul 29, 2008 · All its doing it gobbling up space. > else: > fib.append (i) dispense with the else and just put the fib append outside. ie your code becomes for i in xrange (0,1000000): # xranmge should avoid the extra list if i >= 2: i = fib [i-1] + fib [i-2] fib.append (i) > total = reduce (fibonacci,even) You could use the sum () function in Python 2.5 but ...

  • mail.python.org

    [Tutor] python Error:IndentationError: expected an indented block

    Jan 9, 2007 · For example, to show which statements are controlled by a for or if statement, the controlled statements are indented. Your book should talk about this. So when typing these examples you need to indent the lines after the for, if or while. The indentation can be any consistent white space. Four spaces is a very common indent.