fhieber opened a new issue #20417: URL: https://github.com/apache/incubator-mxnet/issues/20417
## Description An error is thrown when trying to print an mx.np.array of type int32. Unfortunately the error is difficult to reproduce. ### Error Message ``` File "/Users/fhieber/workspace/sockeye/sockeye/beam_search.py", line 886, in forward print('2', finished) File "/Users/fhieber/workspace/mxnet/python/mxnet/numpy/multiarray.py", line 1379, in __str__ array_str = self.asnumpy().__str__() File "/Users/fhieber/workspace/mxnet/python/mxnet/ndarray/ndarray.py", line 2626, in asnumpy ctypes.c_size_t(data.size))) File "/Users/fhieber/workspace/mxnet/python/mxnet/base.py", line 246, in check_call raise get_last_ffi_error() mxnet.base.MXNetError: Traceback (most recent call last): File "/Users/fhieber/workspace/mxnet/src/operator/tensor/indexing_op.cc", line 313 MXNetError: Check failed: is_valid: take operator contains indices out of bound ``` ## To Reproduce Unfortunately I am not able to reproduce this with a minimal example. The array from the error message above is produced in a hybridized block before like this and returned as an output of that block: ``` finished = np.logical_or(best_word_indices == self.pad_id, best_word_indices == self.eos_id) finished = npx.cast(np.expand_dims(finished, axis=1), 'int32') ``` The print statement in the stack trace above was added in the block code that executes the hybrid block. The error does not occur when the code above is not hybridized. ### Steps to reproduce ### Environment: - macos - mxnet compiled from source from #20375 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@mxnet.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@mxnet.apache.org For additional commands, e-mail: issues-h...@mxnet.apache.org