Adding upstream version 4.64.1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
ee08d9327c
commit
2da88b2fbc
89 changed files with 16770 additions and 0 deletions
15
examples/wrapping_generators.py
Normal file
15
examples/wrapping_generators.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
import numpy as np
|
||||
|
||||
from tqdm.contrib import tenumerate, tmap, tzip
|
||||
|
||||
for _ in tenumerate(range(int(1e6)), desc="builtin enumerate"):
|
||||
pass
|
||||
|
||||
for _ in tenumerate(np.random.random((999, 999)), desc="numpy.ndenumerate"):
|
||||
pass
|
||||
|
||||
for _ in tzip(np.arange(1e6), np.arange(1e6) + 1, desc="builtin zip"):
|
||||
pass
|
||||
|
||||
mapped = tmap(lambda x: x + 1, np.arange(1e6), desc="builtin map")
|
||||
assert (np.arange(1e6) + 1 == list(mapped)).all()
|
Loading…
Add table
Add a link
Reference in a new issue