Skip to content
Snippets Groups Projects
Commit cf9eb76b authored by Bas Nijholt's avatar Bas Nijholt
Browse files

add timing notebook

parent 648f7c16
No related branches found
No related tags found
No related merge requests found
%% Cell type:markdown id: tags:
# Timing
%% Cell type:code id: tags:
``` python
import holoviews as hv
hv.notebook_extension()
```
%% Cell type:code id: tags:
``` python
import numpy as np
import learner1D
from time import time
```
%% Cell type:code id: tags:
``` python
times = []
xs = np.random.random((1000, 1000))
ys = np.random.random((1000, 1000))
for (i, (x, y)) in enumerate(zip(xs, ys)):
learner = learner1D.Learner1D(x[:i+2], y[:i+2])
start = time()
learner.choose_points(n=1)
stop = time()
times.append(stop-start)
```
%% Cell type:code id: tags:
``` python
hv.Curve(times)
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment