Something as simple as the following causes a crash locally, for me:
$ ./bin/console
[1] pry(main)> MXNet::NDArray.new
Invoking MXNet::NDArray.new constructs an invalid instance. Specifically, ndarray_allocate() is called but a handle is never allocated, so future calls to mxnet_ndarray_get_handle() return NULL which breaks code that doesn't deal with this case (including inspecting the resulting instance).
There isn't any obvious use case for MXNet::NDArray.new and the Python API doesn't have an equivalent, so I simply redefined it to raise an error in the following PR: https://github.com/mrkn/mxnet.rb/pull/26
Something as simple as the following causes a crash locally, for me:
Invoking
MXNet::NDArray.new
constructs an invalid instance. Specifically,ndarray_allocate()
is called but a handle is never allocated, so future calls tomxnet_ndarray_get_handle()
returnNULL
which breaks code that doesn't deal with this case (including inspecting the resulting instance).There isn't any obvious use case for
MXNet::NDArray.new
and the Python API doesn't have an equivalent, so I simply redefined it to raise an error in the following PR: https://github.com/mrkn/mxnet.rb/pull/26