groupNDArrayByTo

inline fun <T, D : Dimension, K, M : MutableMap<in K, NDArray<T, D1>>> MultiArray<T, D>.groupNDArrayByTo(destination: M, keySelector: (T) -> K): M

Groups elements of the given array by the key returned by keySelector function applied to each element and puts to the destination map each group key associated with an ndarray of corresponding elements.


inline fun <T, D : Dimension, K, V, M : MutableMap<in K, NDArray<V, D1>>> MultiArray<T, D>.groupNDArrayByTo(    destination: M,     keySelector: (T) -> K,     valueTransform: (T) -> V): M

Groups values returned by the valueTransform function applied to each element of the given ndarray by the key returned by keySelector function applied to the element and puts to the destination map each group key associated with an ndarray of corresponding values.