Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

Floating point exception in mxnet.contrib.ndarray.arange_like #19683

Open
DNXie opened this issue Dec 16, 2020 · 5 comments
Open

Floating point exception in mxnet.contrib.ndarray.arange_like #19683

DNXie opened this issue Dec 16, 2020 · 5 comments

Comments

@DNXie
Copy link

DNXie commented Dec 16, 2020

Description

Floating point exception in mxnet.contrib.ndarray.arange_like and mxnet.ndarray.contrib.arange_like when repeat is 0.

Error Message

In mxnet 1.6:

Floating point exception (core dumped)

In mxnet nightly version (2.0.0):

terminate called after throwing an instance of 'dmlc::Error'
  what():  [22:27:50] ../src/initialize.cc:379: FloatingPointError: Floating point exception


Aborted (core dumped)

To Reproduce

import mxnet as mx
mx.contrib.ndarray.arange_like(data=mx.nd.ones(1), repeat=0)
mx.ndarray.contrib.arange_like(data=mx.nd.ones(1), repeat=0)

Environment

OS: ubuntu 18.04
Python: 3.7.6
pip: 20.0.2
numpy: 1.18.5
mxnet: 1.6.0

@leezu
Copy link
Contributor

leezu commented Dec 16, 2020

0 shapes are unsupported in the mxnet.nd interface. Please update to MXNet 2 and use mxnet.np (or use the experimental mxnet.np in mxnet 1.x versions).

I'm closing the issue as it's unsupported.

@leezu leezu closed this as completed Dec 16, 2020
@leezu
Copy link
Contributor

leezu commented Dec 16, 2020

You can refer to #14253 for more information

@DNXie
Copy link
Author

DNXie commented Dec 17, 2020

@leezu This issue doesn't involve 0 in shape.

@leezu
Copy link
Contributor

leezu commented Dec 17, 2020

What do you expect repeat=0 to do?

@leezu
Copy link
Contributor

leezu commented Dec 17, 2020

We can reopen this issue and track improving the error message. It would be great to have a human-readable message instead of a crash.

@leezu leezu reopened this Dec 17, 2020
@szha szha added Operator and removed needs triage labels Feb 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants