- New array mapping implementation using sparse matrices which is ~100x faster and allows for very large input values
- Default is now 64 bit integers for indexing; compatible with
bw_processing
1.0
- Allow
MappedMatrixDict
to take extrakwargs
for compatiblity with custom matrix classes
- Fix diagonal
MappedMatrixDict
-col_mapper
is not required - Unroll tuples when multiplying
SparseMatrixDict
- Switch from
fs
tofsspec
(followingbw_processing
)
- Allow passing
MappedMatrix
subclass toMappedMatrixDict
- Add
SparseMatrixDict
- Defined matrix multiplication for
MappedMatrixDict
- Add
MappedMatrixDict
class forMultiLCA
- Add functions to reset indexers directly and on
MappedMatrix
- Avoid
StopIteration
errors on empty combinatorial filtered datapackages
- Fix an error where the previous attribute
current_data
was not consistently changed todata_current
- Fix an error raised when a
ResourceGroup
was empty after masking
- Add
input_provenance
function on showing from which datapackage and resource group data comes from
Added the following attributes to MappedMatrix
:
input_data_vector
: The stacked data vector from all resource groups.input_row_col_indices
: The stacked indices structured array (with columnsrow
andcol
) from all resource groups.input_indexer_vector
: A vector of values from the resource group indexers. This array flattens value from combinatorial indexers, be careful that you understand the values.input_uncertainties
: The stacked distributions structured array (dtypebw_processing.UNCERTAINTY_DTYPE
) from all resource groups. See the documentation for how this works with arrays and interfaces.
Note that these values are before any aggregation policies are applied, i.e. values to be placed in the same matrix cell are not summed or overwritten.
Rewrote basic functionality of ResourceGroup
to make it clear what data was masked and was wasn't. Removed raw_indices
, indices
, raw_flip
, row
, col
, and data
. We now use a uniform naming convention for data
, row
, and col
:
data_original
: The data as it is present in the datapackage, before masking.data_current
: The data sample used (before aggregation) to build the matrix. It is both masked and flipped.row|col_mapped
: Mapped row and column indices. Has the same length as the datapackage resource, but uses-1
for values which weren't mapped.row|col_masked
: The data after the custom filter and mapping mask have been applied.row|col_matrix
: Row and column indices (but not data) for insertion into the matrix. These indices are after aggregation within the resource group (if any).
flip
is always masked. current_data
is now data_current
(to be consistent with the naming convention), and is both masked and flipped, but not aggregated.
.indices
are removed, use .get_indices_data()
.
- Add
transpose
flag when creating matrices
- Allow array data with
use_distrbutions
(instead of raising an error)
- Fix bug in boolean logic order of operations in
has_relevant_data
- Add
custom_filter
argument to filter out some package data based on indices values. - Add
indexer_override
argument for custom indexers. - Respect existing indexers on datapackages.
filter_groups_for_packages
as a separate utility function instead of inDataPackage
class.- Allow creation of
(0,0)
matrices if no data arrays are present.
First complete public release.