Releases: ivannz/plyr
Split representation for structure-transposed mapping
This release implements backend functionality to compute a function on the leaf data of nested objects and return the results in a split form (.flatapply
):
- a depth-first flat list of the returned values
- the skeletal structure of the used objects with dummy values in the leaves
This representation allows computing structure-transposed application of a callable to nested objects, i.e. when a function itself returns a structured object.
Lunix build patch
This is a minor patch addressing the embarrassing build failure on linux systems due to badly written and sub-standard C code.
Stricter checks and atomic containers
In this release the core nested container detection and handling logic of plyr has been made more strict.
Now, unless specified otherwise, subclasses of tuple, dict and list are never traversed. The notable exception is Namedtuples
, which plyr still descends into, since it considers them as frozen dict containers. Checking for NTs has become more robust: now we additionally check the type's .mro()
to be exacltly [cls, tuple, object]
. This will misdetect objects, that really wants to pass off as namedtuples.
Additionally, we have implemented special Atomic
subclasses of dict, list and tuple, which plyr
will not descend into.
Ragged-edge `plyr`
Implemented leaf broadcasting semantics in ragged-edge containers. Essentially, if we encounter leaf objects
in some structures, while the remaining parallel nested structures have built-in containers at the same
corresponding level of hierarchy, then the leaves are broadcasted deeper into the containers.
Essential `plyr`
This is the first release of plyr
since its separation from rlplay
, where it used to be developed.
The essential functionality of plyr
is in the apply
function. Please see docs therein.