# %%
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
Beispiel #2
0
It's a 2-D dataset"""

ds.author = 'Blake & Mortimer'
ds

# %% [markdown]
# ## Using numpy-like constructors of NDDatasets

# %%
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