question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for `numpy.fromiter`

See original GitHub issue

As far as I can tell there is not an existing issue or implementation for jax.numpy.fromiter, which currently raises:

[NotImplementedError: Numpy function <built-in function fromiter> not yet implemented]()

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
jakevdpcommented, Mar 29, 2022

That’s a great idea!

1reaction
JeppeKlitgaardcommented, Mar 29, 2022

Might it be worthwhile to add a description to the jnp.fromiter function such that it explains the reasoning @froystig mentioned in the error instead of Numpy function <built-in function fromiter> not yet implemented]() in addition to a suggested solution (jnp.asarray(np.fromiter(x)) along with impure + jit caveat)?

One thing I really like about JAX is when the errors have references to solutions and rationale, which the library does excellently in many other places!

Read more comments on GitHub >

github_iconTop Results From Across the Web

numpy.fromiter — NumPy v1.24 Manual
numpy.fromiter# ... Create a new 1-dimensional array from an iterable object. ... The data-type of the returned array. Changed in version 1.23: Object...
Read more >
Using numpy.fromiter with custom function - Stack Overflow
I want to build a numpy.array (of shape (3, 2) ) using numpy.fromiter. The numpy array will consist of 3 numpy arrays containing...
Read more >
numpy.fromiter() in Python - Javatpoint
numpy.fromiter(). This function is used to create a ndarray by using an iterable object. It returns a one-dimensional ndarray object. Syntax.
Read more >
What is the numpy.fromiter() function in Python? - Educative.io
The fromiter() function in Python simply creates a new 1D (one-dimensional) array from an iterable object passed to the object. Syntax. numpy.fromiter(iter, ...
Read more >
NumPy | fromiter method with Examples - SkyTowner
Numpy's fromiter (~) method constructs a Numpy array from an iterable object (e.g. lists and strings). Parameters. 1. iterable | iterable object.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found