Example #1
0
 /// <summary>
 ///     Gets an equivalent memory buffer of the data of the specified NdArray.
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="ndArray"></param>
 /// <returns></returns>
 internal static IBufferNdArrayImpl <T> GetOrCopyBuffer <T>(this MutableNdArray <T> ndArray)
 => (ndArray.Entity as IBufferNdArrayImpl <T>)
 ?? (ndArray.ToMutable().Entity as RawNdArrayImpl <T>) !;