Skip to content

Commit

Permalink
Merge pull request #220 from khaeru/issue/218
Browse files Browse the repository at this point in the history
Remove special handling for dimensions indexed by a 'year' set
  • Loading branch information
khaeru authored Nov 25, 2019
2 parents f68bbeb + a2bbd21 commit 28b5b91
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions ixmp/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -925,17 +925,7 @@ def par(self, name, filters=None, **kwargs):
filters : dict
index names mapped list of index set elements
"""
result = self._backend('item_get_elements', 'par', name, filters)

# FIXME message_ix requires 'year' columns to be returned as integers
# This code should be in a message_ix override of this method.
dtypes = {}
for idx_set, col_name in zip(self.idx_sets(name),
self.idx_names(name)):
if idx_set == 'year':
dtypes[col_name] = int

return result.astype(dtypes) if len(dtypes) else result
return self._backend('item_get_elements', 'par', name, filters)

def add_par(self, name, key_or_data=None, value=None, unit=None,
comment=None, key=None, val=None):
Expand Down

0 comments on commit 28b5b91

Please sign in to comment.