Skip to content

Commit

Permalink
Drop requirement for NdMapping to be defined with OrderedDict (#5867)
Browse files Browse the repository at this point in the history
Co-authored-by: Simon Høxbro Hansen <simon.hansen@me.com>
  • Loading branch information
philippjfr and hoxbro committed Aug 28, 2023
1 parent dbfacbe commit e3dee54
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
4 changes: 0 additions & 4 deletions holoviews/core/ndmapping.py
Expand Up @@ -104,10 +104,6 @@ def __init__(self, initial_items=None, kdims=None, **params):
if kdims is not None:
params['kdims'] = kdims
super().__init__(OrderedDict(), **dict(params))
if type(initial_items) is dict and not self.sort:
raise ValueError('If sort=False the data must define a fixed '
'ordering, please supply a list of items or '
'an OrderedDict, not a regular dictionary.')

self._next_ind = 0
self._check_key_type = True
Expand Down
6 changes: 2 additions & 4 deletions holoviews/element/tabular.py
Expand Up @@ -41,10 +41,8 @@ def cols(self):
def __init__(self, data, **params):
if data is None:
data = []
if type(data) == dict:
raise ValueError("ItemTable cannot accept a standard Python dictionary "
"as a well-defined item ordering is required.")
elif isinstance(data, dict): pass
if isinstance(data, dict):
pass
elif isinstance(data, list):
data = OrderedDict(data)
else:
Expand Down

0 comments on commit e3dee54

Please sign in to comment.