Skip to content
murmot

Results for “function return python array java code error site:numpy.org file”

  • numpy.org

    Array API — NumPy v2.6.dev0 Manual

    It should return a -1 on error and 0 otherwise. Data access#. These functions and macros provide easy access to elements of the ndarray from C. These work for ...

  • numpy.org

    numpy.i: a SWIG interface file for NumPy — NumPy v2.6.dev0 Manual

    The numpy.i interface file does not support typemaps for output arrays, for several reasons. First, C/C++ return arguments are limited to a single value.If the array is not byte-swapped, return 1. Otherwise, set a Python error and return 0. require_dimensions(). Return type: int.

  • numpy.org

    Reading and writing files — NumPy v2.5 Manual

    Reading and writing files # This page tackles common applications; for the full collection of I/O routines, see Input and output. Reading text and CSV files # With no missing values # Use numpy.loadtxt. With missing values # Use numpy.genfromtxt. numpy.genfromtxt will either return a masked array masking out missing values (if usemask=True), or fill in the missing value with the value ...

  • numpy.org

    How to extend NumPy — NumPy v1.15 Manual

    This function must be declared so that it is visible to code outside of the routine. Besides adding the methods and constants you desire, this subroutine must also contain calls like import_array() and/or import_ufunc() depending on which C-API is needed.

  • numpy.org

    numpy.savetxt — NumPy v2.5 Manual

    numpy.savetxt # numpy.savetxt(fname, X, fmt='%.18e', delimiter=' ', newline='\n', header='', footer='', comments='# ', encoding=None) [source] # Save an array to a text file. Parameters: fnamefilename, file handle or pathlib.Path If the filename ends in .gz, the file is automatically saved in compressed gzip format. loadtxt understands gzipped files transparently. X1D or 2D array_like Data to ...

  • numpy.org

    numpy.load — NumPy v2.5 Manual

    If the file is a .npz file, then a dictionary-like object is returned, containing {filename: array} key-value pairs, one for each file in the archive. If the file is a .npz file, the returned value supports the context manager protocol in a similar fashion to the open function:

  • numpy.org

    numpy.array — NumPy v2.5 Manual

    An array, any object exposing the array interface, an object whose __array__ method returns an array, or any (nested) sequence. If object is a scalar, a 0-dimensional array containing object is returned.

  • numpy.org

    numpy.fromfile — NumPy v2.5 Manual

    numpy.fromfile # numpy.fromfile(file, dtype=np.float64, count=-1, sep='', offset=0, *, like=None) # Construct an array from data in a text or binary file. A highly efficient way of reading binary data with a known data-type, as well as parsing simply formatted text files. Data written using the tofile method can be read using this function. Parameters: filefile or str or Path An open file ...

  • numpy.org

    numpy.loadtxt — NumPy v2.5 Manual

    File, filename, list, or generator to read. If the filename extension is .gz or .bz2, the file is first decompressed. Note that generators must return bytes or strings. The strings in a list or produced by a generator are treated as lines. dtypedata-type, optional Data-type of the resulting array; default: float.