ndarray
ndarray copied to clipboard
Refine conversions between array types
-
Move
into_shared
fromDataOwned
toData
, add anA: Clone
bound, and drop the "without any copying" guarantee. (See the discussion in #1021.) -
Implement
From
for more combinations of array types.
I'm not sure about going from DataOwned to Data. I guess there are many alternatives for how it could work. I was first thinking of - unsure if we can realize it - a conversion of owned arrays only, which would move if needed otherwise clone.
Okay, yeah, leaving it on DataOwned
would be fine. We'd still add an A: Clone
bound, and drop the "without any copying" guarantee. OwnedRepr
, OwnedArcRepr
, and the Owned
variant of CowRepr
would implement this without copying, but the View
variant of CowRepr
would copy.