Skip to content

Commit

Permalink
allow none
Browse files Browse the repository at this point in the history
  • Loading branch information
poplarShift committed Apr 29, 2020
1 parent 0fe8163 commit 164f2d9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions param/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1605,6 +1605,9 @@ def __init__(self, default=None, dims=None, coords=None, **params):


def _validate(self, val):
if self.allow_None and val is None:
return

super(DataArray, self)._validate(val)
self._validate_dims_coords(val)

Expand Down Expand Up @@ -1639,6 +1642,9 @@ def __init__(self, default=None, dims=None, coords=None, data_vars=None,


def _validate(self, val):
if self.allow_None and val is None:
return

super(Dataset, self)._validate(val)

self._validate_dims_coords(val)
Expand Down

0 comments on commit 164f2d9

Please sign in to comment.