Skip to content

0.6.3

Choose a tag to compare

@arcondello arcondello released this 03 Jul 23:52
· 391 commits to main since this release
57c93d7

New Features

  • Update the C++ ConstantNode constructors to accept const double*
    rather than double*.
  • Add the Extract symbol and node, following the behavior of
    numpy.extract. See
    #272.
  • Allow BinaryOpNode (which Add, And, Multiply, etc. rely on) to
    accept two dynamic-sized predecessors, as long as they have an
    equivalent shape as determined by their sizeinfo().
  • Add .lower_bound(), .upper_bound(), and .integral() methods to
    the Input symbol.
  • The Where node/symbol now supports the case of all three
    predecessors being dynamic, as long as they have the same shape and
    size.

Upgrade Notes

  • Switch from pkgutil-style namespace package to native namespace
    package (PEP 420). While native namespace packages and pkgutil-style
    namespace packages are largely compatible, we recommend using only
    native ones going forward.

Bug Fixes

  • Fix constructing Constant symbols from read-only NumPy arrays. See
    #296.
  • Fix potential IndexError raised by
    capacitated_vehicle_routing_with_time_windows(). See
    #306.
  • Due to the way AdvancedIndexingNode held the data for
    its shape in the dynamic size case (i.e. when the indexers are
    dynamic), it was possible to encounter issues when mutating multiple
    states on the model. This has been fixed by tracking the shape on
    the node's state data.
  • Previously, the size info as reported by
    ArrayIndexingNode was correct only when the advanced
    indexing operation had no empty slices (i.e. all axes were specified
    with indexing arrays), and even in that case, the full size
    information from the indexing predecessors was not utilized. This
    has been fixed, so certain operations on advanced indexing nodes may
    now be allowed that weren't previously, and a size check may fail
    on certain models that worked before (operations such as
    A + B\[i,:, j, :\] where A is a dynamic 2d array,
    and i and j are dynamic 1d arrays, but
    the dimensions do not match).
  • Fix C++ SizeInfo::substitute() method. Previously it would not
    correctly update the min/max.
  • Fix C++ BasicIndexingNode::sizeinfo() and
    AdvancedIndexingNode::sizeinfo() methods. Previously they would
    sometimes report incorrect size information when indexing or being
    indexed by dynamic nodes.
  • Previously, the check in BinaryOpNode (used by Add, Subtract,
    Maximum, etc) for ensuring that predecessors have the same dynamic
    size did not recurse, meaning that the node might reject some
    predecessors that were actually valid. This has been fixed.
  • Update buffer access to Constant and to ArraySymbol states to
    raise a BufferError when requesting unsupported flags.