CommodityMultiSourceSink.from_data

static CommodityMultiSourceSink.from_data(data, **kwargs)

Construct commodity from data.

Parameters
datatuple or dict

(source, target, rate): a CommoditySingleSourceSink is constructed.

dict: a CommodityMultiSourceSink is constructed.

Returns
CommoditySingleSourceSink or CommodityMultiSourceSink