Skip to content
murmot

Results for “python numpy array example program code early site:mail.python.org 2”

  • mail.python.org

    [Tutor] inserting a vector into an array - numpy Q

    What does this mean? The 1-d array that's being passed in has a different dimension than the 2d array. If we trust the error message, we should make the two arrays the same dimension before we pass them to functions that glue these arrays together.

  • mail.python.org

    [Tutor] 2-D array to string - Python

    Thank you very much Evert. Starting from your advice, I used: a=numpy.array ( [ [100,2,3], [4,5,6], [7,8,9]]) s=repr (a).replace ('array',' ') s=' '+''.join ( [ c for c in s if c not in (' (', ')',' [',']',',')]) print s This gave the correct result. So, the problem is solved. The reason I wanted the array to be converted to string format is that I use such strings as an input to another ...

  • mail.python.org

    [Numpy-discussion] NEP: array API standard adoption (NEP 47)

    The array object ~~~~~~~~~~~~~~~~ Regarding the array object implementation, we plan to start with a regular Python class that wraps a ``numpy.ndarray`` instance. Attributes and methods can forward to that wrapped instance, applying input validation and implementing changed behaviour as needed.

  • mail.python.org

    [Numpy-discussion] f2py with allocatable arrays

    [Numpy-discussion] f2py with allocatable arrays. Sturla Molden sturla at molden.no Tue Jul 3 20:23:37 EDT 2012.The Fortran 90/95 Explained book mentions this in the > allocatable dummy arguments section and has an example using an array > with allocatable, intent(out) in a subrountine.

  • mail.python.org

    [Tutor] maximum value in a Numeric array - Python

    Dec 10, 2004 · Are you using numarray? If so, there appears to be a max method of an array, so you can try b = array ( [ [1,2], [3,4]]) b.max () Note that your method of finding the max row, then finding the max in the row, will not in general give the correct result.

  • mail.python.org

    [Python-Dev] Bool type and arrays

    The minute there is a bool > type in Python people will be able to make Numeric arrays (not to > mention Python arrays) with elements of type "bool". I dunno about Numeric, but you cannot use an arbitrary type for the 'array' module -- you must use one of the documented codes that tell the array module what size items to use.

  • mail.python.org

    [Matrix-SIG] Reading binary data from file into NumPy arrays ...

    Jun 18, 1998 · Hello all, I needed a relatively low-level method to load arbitrary binary data files into NumPy arrays, so I wrote C-extension code to do it after learning a little about the NumPy API through the source code. I've called the module numpyio and it allows reading and writing aribrary data-types to an open file stream.