-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ArrayData
: Make name
optional in get_array
The `ArrayData` was designed to be able to store multiple numpy arrays. While useful, it forced users to be more verbose than necessary when only storing a single array as an explicit array name is always required: node = ArrayData() node.set_array('some_key', numpy.array([])) node.get_array('some_key') The `get_array` method is updated to allow `None` for the `name` argument as long as the node only stores a single array so that it can return the correct array unambiguously. This simplifies typical user code significantly: node = ArrayData(numpy.array([])) node.get_array()
- Loading branch information
Showing
3 changed files
with
35 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters