Created
November 26, 2020 17:13
-
-
Save sofroniewn/882d2ca67bcdb4b6c8993d1c6c04a320 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Display many points layers | |
""" | |
import numpy as np | |
import napari | |
from time import time | |
data = [] | |
for i in range(50): | |
data.append(np.random.random((1000, 2))) | |
viewer = napari.components.ViewerModel() | |
for i, points in enumerate(data): | |
# add the points | |
start = time() | |
viewer.add_points(points) | |
end = time() | |
print(f'run {i} in time {end - start}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment