Skip to content

Commit b44c17c

Browse files
poplarShiftphilippjfr
authored andcommitted
allow none
1 parent dbdc415 commit b44c17c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

param/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1729,6 +1729,9 @@ def __init__(self, default=None, dims=None, coords=None, **params):
17291729

17301730

17311731
def _validate(self, val):
1732+
if self.allow_None and val is None:
1733+
return
1734+
17321735
super(DataArray, self)._validate(val)
17331736
self._validate_dims_coords(val)
17341737

@@ -1763,6 +1766,9 @@ def __init__(self, default=None, dims=None, coords=None, data_vars=None,
17631766

17641767

17651768
def _validate(self, val):
1769+
if self.allow_None and val is None:
1770+
return
1771+
17661772
super(Dataset, self)._validate(val)
17671773

17681774
self._validate_dims_coords(val)

0 commit comments

Comments
 (0)