From 04cf01762fabd05e6733042a5d548403845541ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20M=C3=BCller?= <mueller.seb@posteo.de> Date: Sat, 11 Jan 2025 11:53:05 +0100 Subject: [PATCH] NoGrid: default to scalar data --- src/finam/data/grid_spec.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/finam/data/grid_spec.py b/src/finam/data/grid_spec.py index 9a4f43e3..fdebfd22 100644 --- a/src/finam/data/grid_spec.py +++ b/src/finam/data/grid_spec.py @@ -31,8 +31,6 @@ class NoGrid(GridBase): """ Indicator for data without a spatial grid. - Either dim or data_shape needed. - Parameters ---------- dim : int or None, optional @@ -42,16 +40,13 @@ class NoGrid(GridBase): Raises ------ - ValueError - If none of dim or data_shape are given. ValueError If dim does not match the length of data_shape. """ def __init__(self, dim=None, data_shape=None): if dim is None and data_shape is None: - msg = "NoGrid: either dim or data_shape needed." - raise ValueError(msg) + dim, data_shape = 0, tuple() if data_shape is None: data_shape = (-1,) * dim if dim is None: -- GitLab