Skip to content
murmot

Results for “function return python array code example output error site:numpy.org command”

  • numpy.org

    Beyond the basics — NumPy v2.5.dev0 Manual

    The returned object is an array-iterator object (the same object returned by the .flat attribute of the ndarray). This object is usually cast to PyArrayIterObject* so that its members can be accessed.

  • numpy.org

    NumPy quickstart — NumPy v2.5 Manual

    For example, you can create an array from a regular Python list or tuple using the array function. The type of the resulting array is deduced from the type of the elements in the sequences.

  • numpy.org

    F2PY examples — NumPy v2.6.dev0 Manual

    This example shows a function that filters a two-dimensional array of double precision floating-point numbers using a fixed averaging filter. The advantage of using Fortran to index into multi-dimensional arrays should be clear from this example.

  • numpy.org

    NumPy User Guide

    Setting up Quickstart tutorial NumPy basics Miscellaneous NumPy for Matlab users Building from source Using NumPy C-API Python Module Index Index

  • numpy.org

    Array API — NumPy v2.1 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

    How to extend NumPy — NumPy v2.5.dev0 Manual

    The following example shows how you might write a wrapper that accepts two input arguments (that will be converted to an array) and an output argument (that must be an array). The function returns None and updates the output array.

  • numpy.org

    NumPy: the absolute basics for beginners — NumPy v2.5 Manual

    NumPy (Num erical Py thon) is an open source Python library that’s widely used in science and engineering. The NumPy library contains multidimensional array data structures, such as the homogeneous, N-dimensional ndarray, and a large library of functions that operate efficiently on these data structures.

  • numpy.org

    Array creation — NumPy v2.7.dev0 Manual

    There are 6 general mechanisms for creating arrays: Conversion from other Python structures (i.e. lists and tuples). Intrinsic NumPy array creation functions ( ...

  • numpy.org

    Beyond the Basics — NumPy v1.25 Manual

    The returned object is an array-iterator object (the same object returned by the .flat attribute of the ndarray). This object is usually cast to PyArrayIterObject* so that its members can be accessed.

  • numpy.org

    The N-dimensional array (ndarray) — NumPy v2.5 Manual

    As with other container objects in Python, the contents of an ndarray can be accessed and modified by indexing or slicing the array (using, for example, N integers), and via the methods and attributes of the ndarray.

  • numpy.org

    NumPy C code explanations

    All of the methods only work on ufuncs that take 2-inputs and return 1 output. ... output array when PyArray_ResolveWritebackIfCopy is called at function ...

  • numpy.org

    How to extend NumPy — NumPy v1.14 Manual

    All array creation functions go through this heavily re-used code. Because of its flexibility, it can be somewhat confusing to use.The function returns None and updates the output array. Note the updated use of WRITEBACKIFCOPY semantics for NumPy v1.14 and above.

  • numpy.org

    Array API — NumPy v2.6.dev0 Manual

    For example, a ufunc operation with two input operands and one output operand that is called without out being set in the python API, resolve_descriptors will be passed the descriptors for the two operands and determine the correct descriptor to use for the output based on the output DType set for the ArrayMethod.

  • numpy.org

    Array API — NumPy v1.17 Manual

    Feb 18, 2020 ... Data access¶. These functions and macros provide easy access to elements of the ndarray from C. These work for all arrays. You may need to take ...

  • numpy.org

    numpy.full — NumPy v2.5 Manual

    Return a new array of given shape and type, filled with fill_value. ... If an array-like passed in as like supports the __array_function__ protocol, the result ...