Example #1
0
        public bool TestShape()
        {
            NcFile file = null;

            try {
                file = TestHelper.NewFile(filePath);
                NcDim dim  = file.AddDim("time", 4);
                NcDim node = file.AddDim("node", 5);
                NcDim egg  = file.AddDim("egg", 6);

                NcVar var = file.AddVar("var", NcFloat.Instance, new List <NcDim>()
                {
                    dim, node, egg
                });
                List <int> shape = var.GetShape();
                Assert.Equals(shape.ToArray(), new int[] { 4, 5, 6 });
            } finally {
                file.Close();
            }
            CheckDelete(filePath);
            return(true);
        }