コード例 #1
0
        public void ToShapedIndices(int[] shape, int flattenIndex, int[] ans)
        {
            var imShape = new IndexArray(shape);

            Assert.Equal(ans, NdArrayImpl.ToShapedIndices(imShape, flattenIndex));
        }
コード例 #2
0
 public TransposeNdArrayImpl(NdArrayImpl <T> source, ReadOnlySpan <int> axisMap)
     : base(TransposeShape(source.Shape, axisMap))
 {
     _source  = source;
     _axisMap = axisMap.ToArray();
 }
コード例 #3
0
        public void ToFlattenIndex(int[] shape, int[] shapedIndices, int ans)
        {
            var imShape = new IndexArray(shape);

            Assert.Equal(ans, NdArrayImpl <object> .ToFlattenIndex(imShape, shapedIndices));
        }