Skip to content

Commit

Permalink
Use Quantity() instead of reporting.as_quantity() (for iiasa/ixmp#317)
Browse files Browse the repository at this point in the history
  • Loading branch information
khaeru committed Jun 20, 2020
1 parent 27daa35 commit 52150f0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions message_ix/reporting/computations.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Import other comps so they can be imported from this module
from ixmp.reporting import RENAME_DIMS
from ixmp.reporting import RENAME_DIMS, Quantity
from ixmp.reporting.computations import * # noqa: F401, F403
from ixmp.reporting.computations import product
from ixmp.reporting.quantity import as_quantity
import pandas as pd

from .pyam import as_pyam, concat, write_report # noqa: F401
Expand Down Expand Up @@ -46,7 +45,7 @@ def map_as_qty(set_df, full_set):

return set_df.set_index([set_from, set_to])['value'] \
.rename_axis(index=names) \
.pipe(as_quantity)
.pipe(Quantity)


def broadcast_map(quantity, map, rename={}):
Expand Down

0 comments on commit 52150f0

Please sign in to comment.