mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-28 12:14:43 +00:00
feat: enhance numpy
definitions
This commit is contained in:
parent
54bd51aea5
commit
54f1071d65
7 changed files with 26 additions and 1 deletions
|
@ -0,0 +1,25 @@
|
|||
# TODO: dependent (static shaped)
|
||||
.NDArray = 'ndarray': ClassType
|
||||
.NDArray <: Num
|
||||
.NDArray.
|
||||
shape: [Nat; _]
|
||||
ndim: Nat
|
||||
dtype: Type
|
||||
size: Nat
|
||||
|
||||
.abs: |T|(object: .NDArray(T),) -> .NDArray(T)
|
||||
.add: |T|(object: .NDArray(T), other: .NDArray(T)) -> .NDArray(T)
|
||||
.all: |T <: Num|(object: .NDArray(T),) -> Bool
|
||||
.any: |T <: Num|(object: .NDArray(T),) -> Bool
|
||||
.arange: |T <: Num|(start: T, stop := T, step := T) -> .NDArray(T)
|
||||
.array: |T|(object: Iterable(T),) -> .NDArray(T)
|
||||
.linspace: |T <: Num|(start: T, stop: T, num := Nat, endpoint := Bool, retstep := Bool, dtype := Type, axis := Nat) -> .NDArray(T)
|
||||
.max: |T <: Num|(object: .NDArray(T),) -> T
|
||||
.mean: |T <: Num|(object: .NDArray(T),) -> T
|
||||
.min: |T <: Num|(object: .NDArray(T),) -> T
|
||||
.ones: |T|(shape: Nat or [Nat; _], dtype := Type) -> .NDArray(T)
|
||||
.reshapce: |T|(object: .NDArray(T), shape: [Nat; _]) -> .NDArray(T)
|
||||
.std: |T <: Num|(object: .NDArray(T),) -> T
|
||||
.sum: |T|(object: .NDArray(T),) -> T
|
||||
.sqrt: |T|(object: .NDArray(T),) -> .NDArray(T)
|
||||
.transpose: |T|(object: .NDArray(T), axes := [Nat; _]) -> .NDArray(T)
|
0
crates/erg_compiler/lib/external/numpy.d/fft.d/__init__.d.er
vendored
Normal file
0
crates/erg_compiler/lib/external/numpy.d/fft.d/__init__.d.er
vendored
Normal file
0
crates/erg_compiler/lib/external/numpy.d/lib.d/__init__.d.er
vendored
Normal file
0
crates/erg_compiler/lib/external/numpy.d/lib.d/__init__.d.er
vendored
Normal file
0
crates/erg_compiler/lib/external/numpy.d/linalg.d/__init__.d.er
vendored
Normal file
0
crates/erg_compiler/lib/external/numpy.d/linalg.d/__init__.d.er
vendored
Normal file
0
crates/erg_compiler/lib/external/numpy.d/polynomial.d/__init__.d.er
vendored
Normal file
0
crates/erg_compiler/lib/external/numpy.d/polynomial.d/__init__.d.er
vendored
Normal file
0
crates/erg_compiler/lib/external/numpy.d/random.d/__init__.d.er
vendored
Normal file
0
crates/erg_compiler/lib/external/numpy.d/random.d/__init__.d.er
vendored
Normal file
Loading…
Add table
Add a link
Reference in a new issue