mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-04 10:49:54 +00:00
fix: declaration bugs
This commit is contained in:
parent
14b26a7f4d
commit
6c3536cc31
16 changed files with 275 additions and 61 deletions
|
@ -1,6 +1,9 @@
|
|||
.NDArray = 'ndarray': (T: Type, Shape: [Nat; _]) -> ClassType
|
||||
.NDArray(T, _) <: Output T
|
||||
.NDArray(_, _) <: Num
|
||||
.NDArray(T, S)|<: Add .NDArray(T, S)|.
|
||||
Output: {.NDArray(T, S)}
|
||||
__add__: |T, S: [Nat; _]|(self: .NDArray(T, S), other: .NDArray(T, S)) -> .NDArray(T, S)
|
||||
.NDArray.
|
||||
shape: [Nat; _]
|
||||
ndim: Nat
|
||||
|
@ -11,7 +14,7 @@
|
|||
.Nan: Float
|
||||
|
||||
.abs: |T|(object: .NDArray(T),) -> .NDArray(T)
|
||||
.add: |T|(object: .NDArray(T), other: .NDArray(T)) -> .NDArray(T)
|
||||
.add: |T, S: [Nat; _]|(object: .NDArray(T, S), other: .NDArray(T, S)) -> .NDArray(T, S)
|
||||
.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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue