Closed songjhaha closed 2 years ago
We could create a 0-D array in numpy like:
julia> a = np.array(py_cast(Py,1.0)) Py(array(1.)) julia> a.shape Py(())
Conversion fails in typeassert of ShapeType:
ShapeType
https://github.com/Suzhou-Tongyuan/jnumpy/blob/7e1b5c61148049433ef6ffdb6c89da120df9d878/TyPython/src/CPython.NumPy.jl#L50
https://github.com/Suzhou-Tongyuan/jnumpy/blob/7e1b5c61148049433ef6ffdb6c89da120df9d878/TyPython/src/CPython.NumPy.jl#L97-L98
could fix it with:
const ShapeType = Union{(Tuple{repeat([Py_intptr_t], i)...} for i = 0:SupportedNDim)...}
We could create a 0-D array in numpy like:
Conversion fails in typeassert of
ShapeType
:https://github.com/Suzhou-Tongyuan/jnumpy/blob/7e1b5c61148049433ef6ffdb6c89da120df9d878/TyPython/src/CPython.NumPy.jl#L50
https://github.com/Suzhou-Tongyuan/jnumpy/blob/7e1b5c61148049433ef6ffdb6c89da120df9d878/TyPython/src/CPython.NumPy.jl#L97-L98
could fix it with: