Skip to content

Commit ef25336

Browse files
committed
np.copy
1 parent b19c79c commit ef25336

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,14 @@ pub mod pyndarray {
460460
}
461461
})
462462
}
463+
464+
#[pyfunction]
465+
fn copy(
466+
obj: PyObjectRef,
467+
vm: &VirtualMachine,
468+
) -> PyResult {
469+
vm.call_special_method(&obj, identifier!(vm, __copy__), ())
470+
}
463471
}
464472

465473
impl DataType {

0 commit comments

Comments
 (0)