Array and CArray don't do what the documentation says
- Dominant language
- Python
- Stars
- 462
- Forks
- 90
- PR merge metrics
- No merged PRs in 30d
Description
The description for the `Array` trait type, in the docstring, says:
https://github.com/enthought/traits/blob/94308a28e4cb1e071cfc1e107c8e19081089f88c/traits/trait_numeric.py#L347-L352
while the description for the `CArray` trait type says:
https://github.com/enthought/traits/blob/94308a28e4cb1e071cfc1e107c8e19081089f88c/traits/trait_numeric.py#L398-L404
In practice, this doesn't seem to match how `Array` and `CArray` actually work.
There are at least three somewhat separate things we need to be thinking about the trait-set operation for an `Array`-type trait:
- Whether it accepts non-arrays (tuples, lists, nested lists) and converts those to arrays
- When/whether it accepts arrays with the wrong dtype, and what dtype coercions it's prepared to do
- Whether it makes a copy of the array data when setting. (Also, we may want to care about C-order versus Fortran order.)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.