mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-04 02:39:20 +00:00
fix: external pylib bugs
This commit is contained in:
parent
20935796fd
commit
fb0248fdf1
7 changed files with 41 additions and 5 deletions
|
@ -9,15 +9,21 @@
|
|||
ndim: Nat
|
||||
dtype: Type
|
||||
size: Nat
|
||||
copy: |T, S: [Nat; _]|(self: .NDArray(T, S),) -> .NDArray(T, S)
|
||||
reshape: |T, Old: [Nat; _], S: [Nat; _]|(
|
||||
self: .NDArray(T, Old),
|
||||
shape: {S},
|
||||
) -> .NDArray(T, S)
|
||||
sum: |T <: Num|(self: .NDArray(T, _),) -> T
|
||||
take: (|T|(self: .NDArray(T, _), indice: Nat) -> T) \
|
||||
and (|T|(self: .NDArray(T, _), indices: .NDArray(Nat) or [Nat; _]) -> .NDArray(T, _))
|
||||
tobytes: |T|(self: .NDArray(T, _),) -> Bytes
|
||||
tolist: |T|(self: .NDArray(T, _),) -> [T; _]
|
||||
|
||||
.nan: Float
|
||||
.Nan: Float
|
||||
|
||||
.abs: |T|(object: .NDArray(T),) -> .NDArray(T)
|
||||
.abs: |T, S: [Nat; _]|(object: .NDArray(T, S),) -> .NDArray(T, S)
|
||||
.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
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
.Tqdm! = 'tqdm': (T: Type) -> ClassType
|
||||
.Tqdm!(T) <: Iterable T
|
||||
.Tqdm!(T).
|
||||
# TODO: iterable should be Comparable
|
||||
__call__: (
|
||||
iterable: Iterable(T),
|
||||
desc := Str,
|
||||
|
@ -30,3 +29,5 @@
|
|||
delay := Float,
|
||||
gui := Bool,
|
||||
) -> .Tqdm!(T)
|
||||
|
||||
.tqdm = .Tqdm!.__call__
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue