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.

cupy.min_scalar_type does not accept cupy.ndarray

See original GitHub issue
>>> cupy.min_scalar_type(cupy.array([1, 2]))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: object __array__ method not producing an array
>>> cupy.__version__
'4.0.0'

Because 0-dim array is not “scalar” in cupy, this might be fixed by returning the input if its type is cupy.ndarray.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
roshkinscommented, Oct 26, 2022

Thank you!

1reaction
jakirkhamcommented, Oct 26, 2022

Thanks Kenichi! 🙏

Read more comments on GitHub >

github_iconTop Results From Across the Web

cupy.ndarray — CuPy 11.4.0 documentation
They are not in NumPy. Note. axis argument accepts a tuple of ints, but this is specific to CuPy. NumPy does not support...
Read more >
[FEA]Add cupy array support for BinaryOps with cudf.Series
Series and cupy array it fails but we should support it like pandas does. import cudf import cupy as cp s = cudf....
Read more >
CuPy Documentation - Read the Docs
cupy.asarray() can accept cupy.ndarray, which means we can ... CuPy does not directly support arrays of non-primitive types such as float3,.
Read more >
cudf.Series.to_cupy - RAPIDS Docs
The dtype to pass to numpy.asarray() . copybool, default False. Whether to ensure that the returned value is not a view on another...
Read more >
Python CuPy - GeeksforGeeks
CuPy consists of cupy.ndarray, the core multi-dimensional array class, ... If your device does not support CUDA then you can install CuPy in ......
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