Skip to content
murmot

Results for “python numpy array example api code 2 1 site:mail.python.org package”

  • mail.python.org

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

    Instead they should either accept just NumPy arrays or, if they want to support multiple kinds of arrays, check if the incoming array object supports the array API standard by checking for ``__array_namespace__`` as shown in the example above.

  • mail.python.org

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

    The reason to add more than the minimum required functionality would be that it's too hard to hide the numpy-specific extras. E.g., if we'd do `np.array_api.int32 = np.int32` then that dtype would have methods and behavior that's NumPy-specific.

  • mail.python.org

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

    Feb 21, 2021 · The main > > purpose of this API is to be able to write code that is portable to > > other > > array/tensor libraries like CuPy, PyTorch, JAX, TensorFlow, Dask, and > > MXNet. > > > > We expect this NEP to remain in draft state for quite a while, while > > we're > > gaining experience with using it in downstream libraries, discuss > > adding it ...

  • mail.python.org

    [AstroPy] mollweide projection plotting (celestial ... - Python

    Jun 20, 2013 · Guillaume Blanc --------------- import numpy as np import pylab as pl import math # the spot to plot x = np.array ( [-37, 88, -137, -139, -136, -44]) # longitude y = np.array ( [27, -60, -1.4, -50, -77, -46]) # latitude lab = ['TF0.1', 'TF0.2', 'TF0.3', 'TF0.4', 'TF0.5', 'TF0.6' ] # To plot the celestial equator in galactic coordinates degtorad ...

  • mail.python.org

    [Numpy-discussion] ragged array implimentation

    and returns > numpy object arrays, where the elements of the object arrays are > themselves 1d numpy arrays. I don't think there is any other way to do > it. In your example, the 'ragged' array would be a 1d numpy array with > dtype='O'...

  • mail.python.org

    [Numpy-discussion] accepting NEP 23 - backwards compatibility ...

    Discussion on > removing them happened in 2013 (gh-2880, rejected) and then again in 2019 > (:ref:`NEP32`, accepted without significant complaints). > > Given that they were clearly outside of NumPy's scope, moving them to a > separate ``numpy-financial`` package and removing them from NumPy after a > deprecation period made sense ...

  • mail.python.org

    [Tutor] comparing two numpy arrays

    If I've two numpy arrays, is there a non-looping way of finding common > values. (the example below has identical shapes for the > arrays but this > may not be the case in my scenario) > >.Maybe convert the arrays to lists or tuples then to sets?

  • mail.python.org

    [Tutor] solutions to API version mismatch - Python

    May 11, 2005 · My computer only has the following versions installed: Python 2.1.3+, 2.2.3+ and 2.3.4. I have changed my PYTHONPATH to use look for different site-packages (I've tried version 1.5 and 2.2 -- 1.5 was attempted in case the scripts were written in/during that version).