File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -30,10 +30,13 @@ References like "pr/298" refer to github pull request numbers.
30
30
31
31
New features
32
32
------------
33
- * ArrayProxy method ``get_scaled() `` scales data with a dtype of a
34
- specified precision, promoting as necessary to avoid overflow. This
35
- is to used in ``img.get_fdata() `` to control memory usage. (pr/833)
36
- (CM, reviewed by Ross Markello)
33
+ * ArrayProxy ``__array__() `` now accepts a ``dtype `` parameter, allowing
34
+ ``numpy.array(dataobj, dtype=...) `` calls, as well as casting directly
35
+ with a dtype (for example, ``numpy.float32(dataobj) ``) to control the
36
+ output type. Scale factors (slope, intercept) are applied, but may be
37
+ cast to narrower types, to control memory usage. This is now the basis
38
+ of ``img.get_fdata() ``, which will scale data in single precision if
39
+ the output type is ``float32 ``. (pr/844) (CM, reviewed by ...)
37
40
* GiftiImage method ``agg_data() `` to return usable data arrays (pr/793)
38
41
(Hao-Ting Wang, reviewed by CM)
39
42
* Accept ``os.PathLike `` objects in place of filenames (pr/610) (Cameron
You can’t perform that action at this time.
0 commit comments