1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
"""
NumRS2: High-Performance Numerical Computing for Python
A Rust-powered numerical computing library with a NumPy-compatible interface,
providing blazing-fast performance for scientific computing tasks.
Key Features:
- NumPy-compatible API for seamless migration
- Zero-copy data sharing with NumPy arrays
- High-performance Rust implementations
- SIMD and parallel processing support
- GPU acceleration (optional)
Example:
>>> import numrs2 as nr
>>> import numpy as np
>>>
>>> # Create arrays
>>> a = nr.array([1.0, 2.0, 3.0, 4.0])
>>> b = nr.zeros([2, 3])
>>>
>>> # Operations
>>> c = a * 2.0
>>> d = nr.matmul(b, b.transpose())
>>>
>>> # Convert to NumPy (zero-copy when possible)
>>> numpy_arr = np.array(c)
"""
=
return