Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:dgarcia:python312:numeric
python-nibabel
support-numpy-2.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File support-numpy-2.patch of Package python-nibabel
From 2bad8cce331976af3e8b42cecaed76bb075ee8b3 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz <effigies@gmail.com> Date: Tue, 5 Mar 2024 08:16:05 -0500 Subject: [PATCH] FIX: Use np.asarray instead of np.array(..., copy=False) --- nibabel/affines.py | 2 +- nibabel/casting.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nibabel/affines.py b/nibabel/affines.py index 05fdd7bb5..1478fd2dc 100644 --- a/nibabel/affines.py +++ b/nibabel/affines.py @@ -365,7 +365,7 @@ def rescale_affine(affine, shape, zooms, new_shape=None): A new affine transform with the specified voxel sizes """ - shape = np.array(shape, copy=False) + shape = np.asarray(shape) new_shape = np.array(new_shape if new_shape is not None else shape) s = voxel_sizes(affine) diff --git a/nibabel/casting.py b/nibabel/casting.py index f3e04f30f..09015135f 100644 --- a/nibabel/casting.py +++ b/nibabel/casting.py @@ -611,7 +611,7 @@ def int_abs(arr): >>> int_abs(np.array([-128, 127], dtype=np.float32)) array([128., 127.], dtype=float32) """ - arr = np.array(arr, copy=False) + arr = np.asarray(arr) dt = arr.dtype if dt.kind == 'u': return arr
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor