forked from kscience/kmath
fix NDArray cast
This commit is contained in:
parent
69e6849a12
commit
cfd3f3b7e1
@ -171,8 +171,7 @@ public class MultikTensorAlgebra<T : Number> internal constructor(
|
||||
|
||||
val mt = asMultik().array
|
||||
return if (mt.shape.contentEquals(shape)) {
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
this as NDArray<T, DN>
|
||||
(this as MultikTensor<T>).array
|
||||
} else {
|
||||
NDArray(mt.data, mt.offset, shape, dim = DN(shape.size), base = mt.base ?: mt)
|
||||
}.wrap()
|
||||
|
Loading…
Reference in New Issue
Block a user