units="kilograms", title="Datasets with only ones") # %% df = NDDataset.full((5, 3), fill_value=1.25, coordset=cs, units="radians", title="with only float=1.25") df # %% [markdown] # As with numpy, it is also possible to take another dataset as a template: # %% df = NDDataset.full_like(d3D, dtype="int", fill_value=2) df # %% nd = NDDataset.diag((3, 3, 2.5)) nd # %% [markdown] # ## Copying existing NDDataset # # To copy an existing dataset, this is as simple as: # %% d3D_copy = d3D.copy() # %% [markdown]
# %% dz = NDDataset.zeros((5, 3), coordset=cs, units='meters', title='Datasets with only zeros') # %% do = NDDataset.ones((5, 3), coordset=cs, units='kilograms', title='Datasets with only ones') # %% df = NDDataset.full((5, 3), fill_value=1.25, coordset=cs, units='radians', title='with only float=1.25') df # %% [markdown] # As with numpy, it is also possible to take another dataset as a template: # %% df = NDDataset.full_like(d3D, dtype='int', fill_value=2) df # %% nd = NDDataset.diag((3, 3, 2.5)) nd # %% [markdown] # ## Copying existing NDDataset # # To copy an existing dataset, this is as simple as: # %% d3D_copy = d3D.copy() # %% [markdown]