Skip to content

tests

tests #3538

Triggered via schedule January 5, 2025 14:14
Status Failure
Total duration 29m 6s
Artifacts 1

test.yaml

on: schedule
Run pre-commit
40s
Run pre-commit
Setup workflow
4s
Setup workflow
Pixi lock
10s
Pixi lock
Matrix: core_test_suite
Matrix: ui_test_suite
Matrix: unit_test_suite
result:test
0s
result:test
Fit to window
Zoom out
Zoom in

Annotations

73 errors and 11 warnings
unit:test-312:macos-latest: examples/user_guide/11-Transforming_Elements.ipynb#L1
examples/user_guide/11-Transforming_Elements.ipynb::Cell 20 Notebook cell execution failed Cell 20: Cell execution caused an exception Input: hv.output(backend='matplotlib', size=200) from scipy.misc import ascent stairs_image = hv.Image(ascent()[200:500, :], bounds=[0, 0, ascent().shape[1], 300], label="stairs") stairs_image Traceback: --------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[1], line 3 1 hv.output(backend='matplotlib', size=200) ----> 3 from scipy.misc import ascent 5 stairs_image = hv.Image(ascent()[200:500, :], bounds=[0, 0, ascent().shape[1], 300], label="stairs") 6 stairs_image ImportError: cannot import name 'ascent' from 'scipy.misc' (/Users/runner/work/holoviews/holoviews/.pixi/envs/test-312/lib/python3.12/site-packages/scipy/misc/__init__.py)
unit:test-312:macos-latest: examples/user_guide/11-Transforming_Elements.ipynb#L1
examples/user_guide/11-Transforming_Elements.ipynb::Cell 21 Notebook cell execution failed Cell 21: Cell execution caused an exception Input: from scipy import ndimage class image_filter(hv.Operation): sigma = param.Number(default=5) type_ = param.String(default="low-pass") def _process(self, element, key=None): xs = element.dimension_values(0, expanded=False) ys = element.dimension_values(1, expanded=False) # setting flat=False will preserve the matrix shape data = element.dimension_values(2, flat=False) if self.p.type_ == "high-pass": new_data = data - ndimage.gaussian_filter(data, self.p.sigma) else: new_data = ndimage.gaussian_filter(data, self.p.sigma) label = element.label + " ({} filtered)".format(self.p.type_) # make an exact copy of the element with all settings, just with different data and label: element = element.clone((xs, ys, new_data), label=label) return element stairs_map = hv.HoloMap({sigma: image_filter(stairs_image, sigma=sigma) for sigma in range(0, 12, 1)}, kdims="sigma") stairs_map.opts(framewise=True) Traceback: --------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[1], line 26 23 element = element.clone((xs, ys, new_data), label=label) 24 return element ---> 26 stairs_map = hv.HoloMap({sigma: image_filter(stairs_image, sigma=sigma) 27 for sigma in range(0, 12, 1)}, kdims="sigma") 29 stairs_map.opts(framewise=True) NameError: name 'stairs_image' is not defined
unit:test-312:macos-latest: examples/user_guide/11-Transforming_Elements.ipynb#L1
examples/user_guide/11-Transforming_Elements.ipynb::Cell 22 Notebook cell execution failed Cell 22: Cell execution caused an exception Input: image_filter(stairs_map, type_="high-pass").opts(framewise=True) Traceback: --------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[1], line 1 ----> 1 image_filter(stairs_map, type_="high-pass").opts(framewise=True) NameError: name 'stairs_map' is not defined
unit:test-312:macos-latest: examples/gallery/demos/bokeh/histogram_example.ipynb#L1
examples/gallery/demos/bokeh/histogram_example.ipynb::Cell 1 Notebook cell execution failed Cell 1: Cell execution caused an exception Input: def get_overlay(hist, x, pdf, cdf, label): pdf = hv.Curve((x, pdf), label='PDF') cdf = hv.Curve((x, cdf), label='CDF') return (hv.Histogram(hist, vdims='P(r)') * pdf * cdf).relabel(label) np.seterr(divide='ignore', invalid='ignore') label = "Normal Distribution (μ=0, σ=0.5)" mu, sigma = 0, 0.5 measured = np.random.normal(mu, sigma, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(-2, 2, 1000) pdf = 1/(sigma * np.sqrt(2*np.pi)) * np.exp(-(x-mu)**2 / (2*sigma**2)) cdf = (1+scipy.special.erf((x-mu)/np.sqrt(2*sigma**2)))/2 norm = get_overlay(hist, x, pdf, cdf, label) label = "Log Normal Distribution (μ=0, σ=0.5)" mu, sigma = 0, 0.5 measured = np.random.lognormal(mu, sigma, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 8.0, 1000) pdf = 1/(x* sigma * np.sqrt(2*np.pi)) * np.exp(-(np.log(x)-mu)**2 / (2*sigma**2)) cdf = (1+scipy.special.erf((np.log(x)-mu)/(np.sqrt(2)*sigma)))/2 lognorm = get_overlay(hist, x, pdf, cdf, label) label = "Gamma Distribution (k=1, θ=2)" k, theta = 1.0, 2.0 measured = np.random.gamma(k, theta, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 20.0, 1000) pdf = x**(k-1) * np.exp(-x/theta) / (theta**k * scipy.special.gamma(k)) cdf = scipy.special.gammainc(k, x/theta) / scipy.special.gamma(k) gamma = get_overlay(hist, x, pdf, cdf, label) label = "Beta Distribution (α=2, β=2)" alpha, beta = 2.0, 2.0 measured = np.random.beta(alpha, beta, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 1, 1000) pdf = x**(alpha-1) * (1-x)**(beta-1) / scipy.special.beta(alpha, beta) cdf = scipy.special.btdtr(alpha, beta, x) beta = get_overlay(hist, x, pdf, cdf, label) label = "Weibull Distribution (λ=1, k=1.25)" lam, k = 1, 1.25 measured = lam*(-np.log(np.random.uniform(0, 1, 1000)))**(1/k) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 8, 1000) pdf = (k/lam)*(x/lam)**(k-1) * np.exp(-(x/lam)**k) cdf = 1 - np.exp(-(x/lam)**k) weibull = get_overlay(hist, x, pdf, cdf, label) Traceback: --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In[1], line 52 50 x = np.linspace(0, 1, 1000) 51 pdf = x**(alpha-1) * (1-x)**(beta-1) / scipy.special.beta(alpha, beta) ---> 52 cdf = scipy.special.btdtr(alpha, beta, x) 53 beta = get_overlay(hist, x, pdf, cdf, label) 56 label = "Weibull Distribution (λ=1, k=1.25)" AttributeError: module 'scipy.special' has no attribute 'btdtr'
unit:test-312:macos-latest: examples/gallery/demos/bokeh/histogram_example.ipynb#L1
examples/gallery/demos/bokeh/histogram_example.ipynb::Cell 2 Notebook cell execution failed Cell 2: Cell execution caused an exception Input: layout = (norm + lognorm + gamma + beta + weibull).cols(2) layout.opts( opts.Curve(axiswise=True), opts.Histogram(fill_color="#036564", axiswise=True, height=350, width=350, bgcolor="#E8DDCB"), opts.Layout(shared_axes=False)) Traceback: --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In[1], line 1 ----> 1 layout = (norm + lognorm + gamma + beta + weibull).cols(2) 2 layout.opts( 3 opts.Curve(axiswise=True), 4 opts.Histogram(fill_color="#036564", axiswise=True, height=350, width=350, bgcolor="#E8DDCB"), 5 opts.Layout(shared_axes=False)) File ~/work/holoviews/holoviews/holoviews/core/layout.py:30, in Layoutable.__add__(x, y) 24 raise TypeError(f"unsupported operand type(s) for +: {x.__class__.__name__} and {y.__class__.__name__}. " 25 "If you are trying to use a reduction like `sum(elements)` " 26 "to combine a list of elements, we recommend you use " 27 "`Layout(elements)` (and similarly `Overlay(elements)` for " 28 "making an overlay from a list) instead.") 29 try: ---> 30 return Layout([x, y]) 31 except NotImplementedError: 32 return NotImplemented File ~/work/holoviews/holoviews/holoviews/core/layout.py:442, in Layout.__init__(self, items, identifier, parent, **kwargs) 440 def __init__(self, items=None, identifier=None, parent=None, **kwargs): 441 self.__dict__['_max_cols'] = 4 --> 442 super().__init__(items, identifier, parent, **kwargs) File ~/work/holoviews/holoviews/holoviews/core/di
unit:test-312:macos-latest: examples/gallery/demos/matplotlib/histogram_example.ipynb#L1
examples/gallery/demos/matplotlib/histogram_example.ipynb::Cell 1 Notebook cell execution failed Cell 1: Cell execution caused an exception Input: def get_overlay(hist, x, pdf, cdf, label): pdf = hv.Curve((x, pdf), label='PDF') cdf = hv.Curve((x, cdf), label='CDF') return (hv.Histogram(hist, vdims='P(r)') * pdf * cdf).relabel(label) label = "Normal Distribution (μ=0, σ=0.5)" mu, sigma = 0, 0.5 measured = np.random.normal(mu, sigma, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(-2, 2, 1000) pdf = 1/(sigma * np.sqrt(2*np.pi)) * np.exp(-(x-mu)**2 / (2*sigma**2)) cdf = (1+scipy.special.erf((x-mu)/np.sqrt(2*sigma**2)))/2 norm = get_overlay(hist, x, pdf, cdf, label) np.seterr(divide='ignore', invalid='ignore') label = "Log Normal Distribution (μ=0, σ=0.5)" mu, sigma = 0, 0.5 measured = np.random.lognormal(mu, sigma, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 8.0, 1000) pdf = 1/(x* sigma * np.sqrt(2*np.pi)) * np.exp(-(np.log(x)-mu)**2 / (2*sigma**2)) cdf = (1+scipy.special.erf((np.log(x)-mu)/(np.sqrt(2)*sigma)))/2 lognorm = get_overlay(hist, x, pdf, cdf, label) label = "Gamma Distribution (k=1, θ=2)" k, theta = 1.0, 2.0 measured = np.random.gamma(k, theta, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 20.0, 1000) pdf = x**(k-1) * np.exp(-x/theta) / (theta**k * scipy.special.gamma(k)) cdf = scipy.special.gammainc(k, x/theta) / scipy.special.gamma(k) gamma = get_overlay(hist, x, pdf, cdf, label) label = "Beta Distribution (α=2, β=2)" alpha, beta = 2.0, 2.0 measured = np.random.beta(alpha, beta, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 1, 1000) pdf = x**(alpha-1) * (1-x)**(beta-1) / scipy.special.beta(alpha, beta) cdf = scipy.special.btdtr(alpha, beta, x) beta = get_overlay(hist, x, pdf, cdf, label) label = "Weibull Distribution (λ=1, k=1.25)" lam, k = 1, 1.25 measured = lam*(-np.log(np.random.uniform(0, 1, 1000)))**(1/k) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 8, 1000) pdf = (k/lam)*(x/lam)**(k-1) * np.exp(-(x/lam)**k) cdf = 1 - np.exp(-(x/lam)**k) weibull = get_overlay(hist, x, pdf, cdf, label) Traceback: --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In[1], line 52 50 x = np.linspace(0, 1, 1000) 51 pdf = x**(alpha-1) * (1-x)**(beta-1) / scipy.special.beta(alpha, beta) ---> 52 cdf = scipy.special.btdtr(alpha, beta, x) 53 beta = get_overlay(hist, x, pdf, cdf, label) 56 label = "Weibull Distribution (λ=1, k=1.25)" AttributeError: module 'scipy.special' has no attribute 'btdtr'
unit:test-312:macos-latest: examples/gallery/demos/matplotlib/histogram_example.ipynb#L1
examples/gallery/demos/matplotlib/histogram_example.ipynb::Cell 2 Notebook cell execution failed Cell 2: Cell execution caused an exception Input: (norm + lognorm + gamma + beta + weibull).opts( opts.Curve(axiswise=True), opts.Histogram(facecolor="#036564", axiswise=True, bgcolor="#E8DDCB"), opts.Layout(hspace=0.2)).cols(2) Traceback: --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In[1], line 1 ----> 1 (norm + lognorm + gamma + beta + weibull).opts( 2 opts.Curve(axiswise=True), 3 opts.Histogram(facecolor="#036564", axiswise=True, bgcolor="#E8DDCB"), 4 opts.Layout(hspace=0.2)).cols(2) File ~/work/holoviews/holoviews/holoviews/core/layout.py:30, in Layoutable.__add__(x, y) 24 raise TypeError(f"unsupported operand type(s) for +: {x.__class__.__name__} and {y.__class__.__name__}. " 25 "If you are trying to use a reduction like `sum(elements)` " 26 "to combine a list of elements, we recommend you use " 27 "`Layout(elements)` (and similarly `Overlay(elements)` for " 28 "making an overlay from a list) instead.") 29 try: ---> 30 return Layout([x, y]) 31 except NotImplementedError: 32 return NotImplemented File ~/work/holoviews/holoviews/holoviews/core/layout.py:442, in Layout.__init__(self, items, identifier, parent, **kwargs) 440 def __init__(self, items=None, identifier=None, parent=None, **kwargs): 441 self.__dict__['_max_cols'] = 4 --> 442 super().__init__(items, identifier, parent, **kwargs) File ~/work/holoviews/holoviews/holoviews/core/dimension.py:1313, in ViewableTree.__init__(self, items, identifier, parent, **kwargs) 1310 items = self._
unit:test-312:macos-latest
Process completed with exit code 1.
unit:test-310:macos-latest: examples/user_guide/11-Transforming_Elements.ipynb#L1
examples/user_guide/11-Transforming_Elements.ipynb::Cell 20 Notebook cell execution failed Cell 20: Cell execution caused an exception Input: hv.output(backend='matplotlib', size=200) from scipy.misc import ascent stairs_image = hv.Image(ascent()[200:500, :], bounds=[0, 0, ascent().shape[1], 300], label="stairs") stairs_image Traceback: --------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[1], line 3 1 hv.output(backend='matplotlib', size=200) ----> 3 from scipy.misc import ascent 5 stairs_image = hv.Image(ascent()[200:500, :], bounds=[0, 0, ascent().shape[1], 300], label="stairs") 6 stairs_image ImportError: cannot import name 'ascent' from 'scipy.misc' (/Users/runner/work/holoviews/holoviews/.pixi/envs/test-310/lib/python3.10/site-packages/scipy/misc/__init__.py)
unit:test-310:macos-latest: examples/user_guide/11-Transforming_Elements.ipynb#L1
examples/user_guide/11-Transforming_Elements.ipynb::Cell 21 Notebook cell execution failed Cell 21: Cell execution caused an exception Input: from scipy import ndimage class image_filter(hv.Operation): sigma = param.Number(default=5) type_ = param.String(default="low-pass") def _process(self, element, key=None): xs = element.dimension_values(0, expanded=False) ys = element.dimension_values(1, expanded=False) # setting flat=False will preserve the matrix shape data = element.dimension_values(2, flat=False) if self.p.type_ == "high-pass": new_data = data - ndimage.gaussian_filter(data, self.p.sigma) else: new_data = ndimage.gaussian_filter(data, self.p.sigma) label = element.label + " ({} filtered)".format(self.p.type_) # make an exact copy of the element with all settings, just with different data and label: element = element.clone((xs, ys, new_data), label=label) return element stairs_map = hv.HoloMap({sigma: image_filter(stairs_image, sigma=sigma) for sigma in range(0, 12, 1)}, kdims="sigma") stairs_map.opts(framewise=True) Traceback: --------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[1], line 26 23 element = element.clone((xs, ys, new_data), label=label) 24 return element ---> 26 stairs_map = hv.HoloMap({sigma: image_filter(stairs_image, sigma=sigma) 27 for sigma in range(0, 12, 1)}, kdims="sigma") 29 stairs_map.opts(framewise=True) Cell In[1], line 26, in <dictcomp>(.0) 23 element = element.clone((xs, ys, new_data), label=label) 24 return element ---> 26 stairs_map = hv.HoloMap({sigma: image_filter(stairs_image, sigma=sigma) 27 for sigma in range(0, 12, 1)}, kdims="sigma") 29 stairs_map.opts(framewise=True) NameError: name 'stairs_image' is not defined
unit:test-310:macos-latest: examples/user_guide/11-Transforming_Elements.ipynb#L1
examples/user_guide/11-Transforming_Elements.ipynb::Cell 22 Notebook cell execution failed Cell 22: Cell execution caused an exception Input: image_filter(stairs_map, type_="high-pass").opts(framewise=True) Traceback: --------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[1], line 1 ----> 1 image_filter(stairs_map, type_="high-pass").opts(framewise=True) NameError: name 'stairs_map' is not defined
unit:test-310:macos-latest: examples/gallery/demos/bokeh/histogram_example.ipynb#L1
examples/gallery/demos/bokeh/histogram_example.ipynb::Cell 1 Notebook cell execution failed Cell 1: Cell execution caused an exception Input: def get_overlay(hist, x, pdf, cdf, label): pdf = hv.Curve((x, pdf), label='PDF') cdf = hv.Curve((x, cdf), label='CDF') return (hv.Histogram(hist, vdims='P(r)') * pdf * cdf).relabel(label) np.seterr(divide='ignore', invalid='ignore') label = "Normal Distribution (μ=0, σ=0.5)" mu, sigma = 0, 0.5 measured = np.random.normal(mu, sigma, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(-2, 2, 1000) pdf = 1/(sigma * np.sqrt(2*np.pi)) * np.exp(-(x-mu)**2 / (2*sigma**2)) cdf = (1+scipy.special.erf((x-mu)/np.sqrt(2*sigma**2)))/2 norm = get_overlay(hist, x, pdf, cdf, label) label = "Log Normal Distribution (μ=0, σ=0.5)" mu, sigma = 0, 0.5 measured = np.random.lognormal(mu, sigma, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 8.0, 1000) pdf = 1/(x* sigma * np.sqrt(2*np.pi)) * np.exp(-(np.log(x)-mu)**2 / (2*sigma**2)) cdf = (1+scipy.special.erf((np.log(x)-mu)/(np.sqrt(2)*sigma)))/2 lognorm = get_overlay(hist, x, pdf, cdf, label) label = "Gamma Distribution (k=1, θ=2)" k, theta = 1.0, 2.0 measured = np.random.gamma(k, theta, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 20.0, 1000) pdf = x**(k-1) * np.exp(-x/theta) / (theta**k * scipy.special.gamma(k)) cdf = scipy.special.gammainc(k, x/theta) / scipy.special.gamma(k) gamma = get_overlay(hist, x, pdf, cdf, label) label = "Beta Distribution (α=2, β=2)" alpha, beta = 2.0, 2.0 measured = np.random.beta(alpha, beta, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 1, 1000) pdf = x**(alpha-1) * (1-x)**(beta-1) / scipy.special.beta(alpha, beta) cdf = scipy.special.btdtr(alpha, beta, x) beta = get_overlay(hist, x, pdf, cdf, label) label = "Weibull Distribution (λ=1, k=1.25)" lam, k = 1, 1.25 measured = lam*(-np.log(np.random.uniform(0, 1, 1000)))**(1/k) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 8, 1000) pdf = (k/lam)*(x/lam)**(k-1) * np.exp(-(x/lam)**k) cdf = 1 - np.exp(-(x/lam)**k) weibull = get_overlay(hist, x, pdf, cdf, label) Traceback: --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In[1], line 52 50 x = np.linspace(0, 1, 1000) 51 pdf = x**(alpha-1) * (1-x)**(beta-1) / scipy.special.beta(alpha, beta) ---> 52 cdf = scipy.special.btdtr(alpha, beta, x) 53 beta = get_overlay(hist, x, pdf, cdf, label) 56 label = "Weibull Distribution (λ=1, k=1.25)" AttributeError: module 'scipy.special' has no attribute 'btdtr'
unit:test-310:macos-latest: examples/gallery/demos/bokeh/histogram_example.ipynb#L1
examples/gallery/demos/bokeh/histogram_example.ipynb::Cell 2 Notebook cell execution failed Cell 2: Cell execution caused an exception Input: layout = (norm + lognorm + gamma + beta + weibull).cols(2) layout.opts( opts.Curve(axiswise=True), opts.Histogram(fill_color="#036564", axiswise=True, height=350, width=350, bgcolor="#E8DDCB"), opts.Layout(shared_axes=False)) Traceback: --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In[1], line 1 ----> 1 layout = (norm + lognorm + gamma + beta + weibull).cols(2) 2 layout.opts( 3 opts.Curve(axiswise=True), 4 opts.Histogram(fill_color="#036564", axiswise=True, height=350, width=350, bgcolor="#E8DDCB"), 5 opts.Layout(shared_axes=False)) File ~/work/holoviews/holoviews/holoviews/core/layout.py:30, in Layoutable.__add__(x, y) 24 raise TypeError(f"unsupported operand type(s) for +: {x.__class__.__name__} and {y.__class__.__name__}. " 25 "If you are trying to use a reduction like `sum(elements)` " 26 "to combine a list of elements, we recommend you use " 27 "`Layout(elements)` (and similarly `Overlay(elements)` for " 28 "making an overlay from a list) instead.") 29 try: ---> 30 return Layout([x, y]) 31 except NotImplementedError: 32 return NotImplemented File ~/work/holoviews/holoviews/holoviews/core/layout.py:442, in Layout.__init__(self, items, identifier, parent, **kwargs) 440 def __init__(self, items=None, identifier=None, parent=None, **kwargs): 441 self.__dict__['_max_cols'] = 4 --> 442 super().__init__(items, identifier, parent, **kwargs) File ~/work/holoviews/holoviews/holoviews/core/di
unit:test-310:macos-latest: examples/gallery/demos/matplotlib/histogram_example.ipynb#L1
examples/gallery/demos/matplotlib/histogram_example.ipynb::Cell 1 Notebook cell execution failed Cell 1: Cell execution caused an exception Input: def get_overlay(hist, x, pdf, cdf, label): pdf = hv.Curve((x, pdf), label='PDF') cdf = hv.Curve((x, cdf), label='CDF') return (hv.Histogram(hist, vdims='P(r)') * pdf * cdf).relabel(label) label = "Normal Distribution (μ=0, σ=0.5)" mu, sigma = 0, 0.5 measured = np.random.normal(mu, sigma, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(-2, 2, 1000) pdf = 1/(sigma * np.sqrt(2*np.pi)) * np.exp(-(x-mu)**2 / (2*sigma**2)) cdf = (1+scipy.special.erf((x-mu)/np.sqrt(2*sigma**2)))/2 norm = get_overlay(hist, x, pdf, cdf, label) np.seterr(divide='ignore', invalid='ignore') label = "Log Normal Distribution (μ=0, σ=0.5)" mu, sigma = 0, 0.5 measured = np.random.lognormal(mu, sigma, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 8.0, 1000) pdf = 1/(x* sigma * np.sqrt(2*np.pi)) * np.exp(-(np.log(x)-mu)**2 / (2*sigma**2)) cdf = (1+scipy.special.erf((np.log(x)-mu)/(np.sqrt(2)*sigma)))/2 lognorm = get_overlay(hist, x, pdf, cdf, label) label = "Gamma Distribution (k=1, θ=2)" k, theta = 1.0, 2.0 measured = np.random.gamma(k, theta, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 20.0, 1000) pdf = x**(k-1) * np.exp(-x/theta) / (theta**k * scipy.special.gamma(k)) cdf = scipy.special.gammainc(k, x/theta) / scipy.special.gamma(k) gamma = get_overlay(hist, x, pdf, cdf, label) label = "Beta Distribution (α=2, β=2)" alpha, beta = 2.0, 2.0 measured = np.random.beta(alpha, beta, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 1, 1000) pdf = x**(alpha-1) * (1-x)**(beta-1) / scipy.special.beta(alpha, beta) cdf = scipy.special.btdtr(alpha, beta, x) beta = get_overlay(hist, x, pdf, cdf, label) label = "Weibull Distribution (λ=1, k=1.25)" lam, k = 1, 1.25 measured = lam*(-np.log(np.random.uniform(0, 1, 1000)))**(1/k) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 8, 1000) pdf = (k/lam)*(x/lam)**(k-1) * np.exp(-(x/lam)**k) cdf = 1 - np.exp(-(x/lam)**k) weibull = get_overlay(hist, x, pdf, cdf, label) Traceback: --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In[1], line 52 50 x = np.linspace(0, 1, 1000) 51 pdf = x**(alpha-1) * (1-x)**(beta-1) / scipy.special.beta(alpha, beta) ---> 52 cdf = scipy.special.btdtr(alpha, beta, x) 53 beta = get_overlay(hist, x, pdf, cdf, label) 56 label = "Weibull Distribution (λ=1, k=1.25)" AttributeError: module 'scipy.special' has no attribute 'btdtr'
unit:test-310:macos-latest: examples/gallery/demos/matplotlib/histogram_example.ipynb#L1
examples/gallery/demos/matplotlib/histogram_example.ipynb::Cell 2 Notebook cell execution failed Cell 2: Cell execution caused an exception Input: (norm + lognorm + gamma + beta + weibull).opts( opts.Curve(axiswise=True), opts.Histogram(facecolor="#036564", axiswise=True, bgcolor="#E8DDCB"), opts.Layout(hspace=0.2)).cols(2) Traceback: --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In[1], line 1 ----> 1 (norm + lognorm + gamma + beta + weibull).opts( 2 opts.Curve(axiswise=True), 3 opts.Histogram(facecolor="#036564", axiswise=True, bgcolor="#E8DDCB"), 4 opts.Layout(hspace=0.2)).cols(2) File ~/work/holoviews/holoviews/holoviews/core/layout.py:30, in Layoutable.__add__(x, y) 24 raise TypeError(f"unsupported operand type(s) for +: {x.__class__.__name__} and {y.__class__.__name__}. " 25 "If you are trying to use a reduction like `sum(elements)` " 26 "to combine a list of elements, we recommend you use " 27 "`Layout(elements)` (and similarly `Overlay(elements)` for " 28 "making an overlay from a list) instead.") 29 try: ---> 30 return Layout([x, y]) 31 except NotImplementedError: 32 return NotImplemented File ~/work/holoviews/holoviews/holoviews/core/layout.py:442, in Layout.__init__(self, items, identifier, parent, **kwargs) 440 def __init__(self, items=None, identifier=None, parent=None, **kwargs): 441 self.__dict__['_max_cols'] = 4 --> 442 super().__init__(items, identifier, parent, **kwargs) File ~/work/holoviews/holoviews/holoviews/core/dimension.py:1313, in ViewableTree.__init__(self, items, identifier, parent, **kwargs) 1310 items = self._
unit:test-310:macos-latest
Process completed with exit code 1.
unit:test-311:macos-latest: examples/user_guide/11-Transforming_Elements.ipynb#L1
examples/user_guide/11-Transforming_Elements.ipynb::Cell 20 Notebook cell execution failed Cell 20: Cell execution caused an exception Input: hv.output(backend='matplotlib', size=200) from scipy.misc import ascent stairs_image = hv.Image(ascent()[200:500, :], bounds=[0, 0, ascent().shape[1], 300], label="stairs") stairs_image Traceback: --------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[1], line 3 1 hv.output(backend='matplotlib', size=200) ----> 3 from scipy.misc import ascent 5 stairs_image = hv.Image(ascent()[200:500, :], bounds=[0, 0, ascent().shape[1], 300], label="stairs") 6 stairs_image ImportError: cannot import name 'ascent' from 'scipy.misc' (/Users/runner/work/holoviews/holoviews/.pixi/envs/test-311/lib/python3.11/site-packages/scipy/misc/__init__.py)
unit:test-311:macos-latest: examples/user_guide/11-Transforming_Elements.ipynb#L1
examples/user_guide/11-Transforming_Elements.ipynb::Cell 21 Notebook cell execution failed Cell 21: Cell execution caused an exception Input: from scipy import ndimage class image_filter(hv.Operation): sigma = param.Number(default=5) type_ = param.String(default="low-pass") def _process(self, element, key=None): xs = element.dimension_values(0, expanded=False) ys = element.dimension_values(1, expanded=False) # setting flat=False will preserve the matrix shape data = element.dimension_values(2, flat=False) if self.p.type_ == "high-pass": new_data = data - ndimage.gaussian_filter(data, self.p.sigma) else: new_data = ndimage.gaussian_filter(data, self.p.sigma) label = element.label + " ({} filtered)".format(self.p.type_) # make an exact copy of the element with all settings, just with different data and label: element = element.clone((xs, ys, new_data), label=label) return element stairs_map = hv.HoloMap({sigma: image_filter(stairs_image, sigma=sigma) for sigma in range(0, 12, 1)}, kdims="sigma") stairs_map.opts(framewise=True) Traceback: --------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[1], line 26 23 element = element.clone((xs, ys, new_data), label=label) 24 return element ---> 26 stairs_map = hv.HoloMap({sigma: image_filter(stairs_image, sigma=sigma) 27 for sigma in range(0, 12, 1)}, kdims="sigma") 29 stairs_map.opts(framewise=True) Cell In[1], line 26, in <dictcomp>(.0) 23 element = element.clone((xs, ys, new_data), label=label) 24 return element ---> 26 stairs_map = hv.HoloMap({sigma: image_filter(stairs_image, sigma=sigma) 27 for sigma in range(0, 12, 1)}, kdims="sigma") 29 stairs_map.opts(framewise=True) NameError: name 'stairs_image' is not defined
unit:test-311:macos-latest: examples/user_guide/11-Transforming_Elements.ipynb#L1
examples/user_guide/11-Transforming_Elements.ipynb::Cell 22 Notebook cell execution failed Cell 22: Cell execution caused an exception Input: image_filter(stairs_map, type_="high-pass").opts(framewise=True) Traceback: --------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[1], line 1 ----> 1 image_filter(stairs_map, type_="high-pass").opts(framewise=True) NameError: name 'stairs_map' is not defined
unit:test-311:macos-latest: examples/gallery/demos/bokeh/histogram_example.ipynb#L1
examples/gallery/demos/bokeh/histogram_example.ipynb::Cell 1 Notebook cell execution failed Cell 1: Cell execution caused an exception Input: def get_overlay(hist, x, pdf, cdf, label): pdf = hv.Curve((x, pdf), label='PDF') cdf = hv.Curve((x, cdf), label='CDF') return (hv.Histogram(hist, vdims='P(r)') * pdf * cdf).relabel(label) np.seterr(divide='ignore', invalid='ignore') label = "Normal Distribution (μ=0, σ=0.5)" mu, sigma = 0, 0.5 measured = np.random.normal(mu, sigma, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(-2, 2, 1000) pdf = 1/(sigma * np.sqrt(2*np.pi)) * np.exp(-(x-mu)**2 / (2*sigma**2)) cdf = (1+scipy.special.erf((x-mu)/np.sqrt(2*sigma**2)))/2 norm = get_overlay(hist, x, pdf, cdf, label) label = "Log Normal Distribution (μ=0, σ=0.5)" mu, sigma = 0, 0.5 measured = np.random.lognormal(mu, sigma, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 8.0, 1000) pdf = 1/(x* sigma * np.sqrt(2*np.pi)) * np.exp(-(np.log(x)-mu)**2 / (2*sigma**2)) cdf = (1+scipy.special.erf((np.log(x)-mu)/(np.sqrt(2)*sigma)))/2 lognorm = get_overlay(hist, x, pdf, cdf, label) label = "Gamma Distribution (k=1, θ=2)" k, theta = 1.0, 2.0 measured = np.random.gamma(k, theta, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 20.0, 1000) pdf = x**(k-1) * np.exp(-x/theta) / (theta**k * scipy.special.gamma(k)) cdf = scipy.special.gammainc(k, x/theta) / scipy.special.gamma(k) gamma = get_overlay(hist, x, pdf, cdf, label) label = "Beta Distribution (α=2, β=2)" alpha, beta = 2.0, 2.0 measured = np.random.beta(alpha, beta, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 1, 1000) pdf = x**(alpha-1) * (1-x)**(beta-1) / scipy.special.beta(alpha, beta) cdf = scipy.special.btdtr(alpha, beta, x) beta = get_overlay(hist, x, pdf, cdf, label) label = "Weibull Distribution (λ=1, k=1.25)" lam, k = 1, 1.25 measured = lam*(-np.log(np.random.uniform(0, 1, 1000)))**(1/k) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 8, 1000) pdf = (k/lam)*(x/lam)**(k-1) * np.exp(-(x/lam)**k) cdf = 1 - np.exp(-(x/lam)**k) weibull = get_overlay(hist, x, pdf, cdf, label) Traceback: --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In[1], line 52 50 x = np.linspace(0, 1, 1000) 51 pdf = x**(alpha-1) * (1-x)**(beta-1) / scipy.special.beta(alpha, beta) ---> 52 cdf = scipy.special.btdtr(alpha, beta, x) 53 beta = get_overlay(hist, x, pdf, cdf, label) 56 label = "Weibull Distribution (λ=1, k=1.25)" AttributeError: module 'scipy.special' has no attribute 'btdtr'
unit:test-311:macos-latest: examples/gallery/demos/bokeh/histogram_example.ipynb#L1
examples/gallery/demos/bokeh/histogram_example.ipynb::Cell 2 Notebook cell execution failed Cell 2: Cell execution caused an exception Input: layout = (norm + lognorm + gamma + beta + weibull).cols(2) layout.opts( opts.Curve(axiswise=True), opts.Histogram(fill_color="#036564", axiswise=True, height=350, width=350, bgcolor="#E8DDCB"), opts.Layout(shared_axes=False)) Traceback: --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In[1], line 1 ----> 1 layout = (norm + lognorm + gamma + beta + weibull).cols(2) 2 layout.opts( 3 opts.Curve(axiswise=True), 4 opts.Histogram(fill_color="#036564", axiswise=True, height=350, width=350, bgcolor="#E8DDCB"), 5 opts.Layout(shared_axes=False)) File ~/work/holoviews/holoviews/holoviews/core/layout.py:30, in Layoutable.__add__(x, y) 24 raise TypeError(f"unsupported operand type(s) for +: {x.__class__.__name__} and {y.__class__.__name__}. " 25 "If you are trying to use a reduction like `sum(elements)` " 26 "to combine a list of elements, we recommend you use " 27 "`Layout(elements)` (and similarly `Overlay(elements)` for " 28 "making an overlay from a list) instead.") 29 try: ---> 30 return Layout([x, y]) 31 except NotImplementedError: 32 return NotImplemented File ~/work/holoviews/holoviews/holoviews/core/layout.py:442, in Layout.__init__(self, items, identifier, parent, **kwargs) 440 def __init__(self, items=None, identifier=None, parent=None, **kwargs): 441 self.__dict__['_max_cols'] = 4 --> 442 super().__init__(items, identifier, parent, **kwargs) File ~/work/holoviews/holoviews/holoviews/core/di
unit:test-311:macos-latest: examples/gallery/demos/matplotlib/histogram_example.ipynb#L1
examples/gallery/demos/matplotlib/histogram_example.ipynb::Cell 1 Notebook cell execution failed Cell 1: Cell execution caused an exception Input: def get_overlay(hist, x, pdf, cdf, label): pdf = hv.Curve((x, pdf), label='PDF') cdf = hv.Curve((x, cdf), label='CDF') return (hv.Histogram(hist, vdims='P(r)') * pdf * cdf).relabel(label) label = "Normal Distribution (μ=0, σ=0.5)" mu, sigma = 0, 0.5 measured = np.random.normal(mu, sigma, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(-2, 2, 1000) pdf = 1/(sigma * np.sqrt(2*np.pi)) * np.exp(-(x-mu)**2 / (2*sigma**2)) cdf = (1+scipy.special.erf((x-mu)/np.sqrt(2*sigma**2)))/2 norm = get_overlay(hist, x, pdf, cdf, label) np.seterr(divide='ignore', invalid='ignore') label = "Log Normal Distribution (μ=0, σ=0.5)" mu, sigma = 0, 0.5 measured = np.random.lognormal(mu, sigma, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 8.0, 1000) pdf = 1/(x* sigma * np.sqrt(2*np.pi)) * np.exp(-(np.log(x)-mu)**2 / (2*sigma**2)) cdf = (1+scipy.special.erf((np.log(x)-mu)/(np.sqrt(2)*sigma)))/2 lognorm = get_overlay(hist, x, pdf, cdf, label) label = "Gamma Distribution (k=1, θ=2)" k, theta = 1.0, 2.0 measured = np.random.gamma(k, theta, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 20.0, 1000) pdf = x**(k-1) * np.exp(-x/theta) / (theta**k * scipy.special.gamma(k)) cdf = scipy.special.gammainc(k, x/theta) / scipy.special.gamma(k) gamma = get_overlay(hist, x, pdf, cdf, label) label = "Beta Distribution (α=2, β=2)" alpha, beta = 2.0, 2.0 measured = np.random.beta(alpha, beta, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 1, 1000) pdf = x**(alpha-1) * (1-x)**(beta-1) / scipy.special.beta(alpha, beta) cdf = scipy.special.btdtr(alpha, beta, x) beta = get_overlay(hist, x, pdf, cdf, label) label = "Weibull Distribution (λ=1, k=1.25)" lam, k = 1, 1.25 measured = lam*(-np.log(np.random.uniform(0, 1, 1000)))**(1/k) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 8, 1000) pdf = (k/lam)*(x/lam)**(k-1) * np.exp(-(x/lam)**k) cdf = 1 - np.exp(-(x/lam)**k) weibull = get_overlay(hist, x, pdf, cdf, label) Traceback: --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In[1], line 52 50 x = np.linspace(0, 1, 1000) 51 pdf = x**(alpha-1) * (1-x)**(beta-1) / scipy.special.beta(alpha, beta) ---> 52 cdf = scipy.special.btdtr(alpha, beta, x) 53 beta = get_overlay(hist, x, pdf, cdf, label) 56 label = "Weibull Distribution (λ=1, k=1.25)" AttributeError: module 'scipy.special' has no attribute 'btdtr'
unit:test-311:macos-latest: examples/gallery/demos/matplotlib/histogram_example.ipynb#L1
examples/gallery/demos/matplotlib/histogram_example.ipynb::Cell 2 Notebook cell execution failed Cell 2: Cell execution caused an exception Input: (norm + lognorm + gamma + beta + weibull).opts( opts.Curve(axiswise=True), opts.Histogram(facecolor="#036564", axiswise=True, bgcolor="#E8DDCB"), opts.Layout(hspace=0.2)).cols(2) Traceback: --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In[1], line 1 ----> 1 (norm + lognorm + gamma + beta + weibull).opts( 2 opts.Curve(axiswise=True), 3 opts.Histogram(facecolor="#036564", axiswise=True, bgcolor="#E8DDCB"), 4 opts.Layout(hspace=0.2)).cols(2) File ~/work/holoviews/holoviews/holoviews/core/layout.py:30, in Layoutable.__add__(x, y) 24 raise TypeError(f"unsupported operand type(s) for +: {x.__class__.__name__} and {y.__class__.__name__}. " 25 "If you are trying to use a reduction like `sum(elements)` " 26 "to combine a list of elements, we recommend you use " 27 "`Layout(elements)` (and similarly `Overlay(elements)` for " 28 "making an overlay from a list) instead.") 29 try: ---> 30 return Layout([x, y]) 31 except NotImplementedError: 32 return NotImplemented File ~/work/holoviews/holoviews/holoviews/core/layout.py:442, in Layout.__init__(self, items, identifier, parent, **kwargs) 440 def __init__(self, items=None, identifier=None, parent=None, **kwargs): 441 self.__dict__['_max_cols'] = 4 --> 442 super().__init__(items, identifier, parent, **kwargs) File ~/work/holoviews/holoviews/holoviews/core/dimension.py:1313, in ViewableTree.__init__(self, items, identifier, parent, **kwargs) 1310 items = self._
unit:test-311:macos-latest
Process completed with exit code 1.
unit:test-312:ubuntu-latest: examples/user_guide/11-Transforming_Elements.ipynb#L1
examples/user_guide/11-Transforming_Elements.ipynb::Cell 20 Notebook cell execution failed Cell 20: Cell execution caused an exception Input: hv.output(backend='matplotlib', size=200) from scipy.misc import ascent stairs_image = hv.Image(ascent()[200:500, :], bounds=[0, 0, ascent().shape[1], 300], label="stairs") stairs_image Traceback: --------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[1], line 3 1 hv.output(backend='matplotlib', size=200) ----> 3 from scipy.misc import ascent 5 stairs_image = hv.Image(ascent()[200:500, :], bounds=[0, 0, ascent().shape[1], 300], label="stairs") 6 stairs_image ImportError: cannot import name 'ascent' from 'scipy.misc' (/home/runner/work/holoviews/holoviews/.pixi/envs/test-312/lib/python3.12/site-packages/scipy/misc/__init__.py)
unit:test-312:ubuntu-latest: examples/user_guide/11-Transforming_Elements.ipynb#L1
examples/user_guide/11-Transforming_Elements.ipynb::Cell 21 Notebook cell execution failed Cell 21: Cell execution caused an exception Input: from scipy import ndimage class image_filter(hv.Operation): sigma = param.Number(default=5) type_ = param.String(default="low-pass") def _process(self, element, key=None): xs = element.dimension_values(0, expanded=False) ys = element.dimension_values(1, expanded=False) # setting flat=False will preserve the matrix shape data = element.dimension_values(2, flat=False) if self.p.type_ == "high-pass": new_data = data - ndimage.gaussian_filter(data, self.p.sigma) else: new_data = ndimage.gaussian_filter(data, self.p.sigma) label = element.label + " ({} filtered)".format(self.p.type_) # make an exact copy of the element with all settings, just with different data and label: element = element.clone((xs, ys, new_data), label=label) return element stairs_map = hv.HoloMap({sigma: image_filter(stairs_image, sigma=sigma) for sigma in range(0, 12, 1)}, kdims="sigma") stairs_map.opts(framewise=True) Traceback: --------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[1], line 26 23 element = element.clone((xs, ys, new_data), label=label) 24 return element ---> 26 stairs_map = hv.HoloMap({sigma: image_filter(stairs_image, sigma=sigma) 27 for sigma in range(0, 12, 1)}, kdims="sigma") 29 stairs_map.opts(framewise=True) NameError: name 'stairs_image' is not defined
unit:test-312:ubuntu-latest: examples/user_guide/11-Transforming_Elements.ipynb#L1
examples/user_guide/11-Transforming_Elements.ipynb::Cell 22 Notebook cell execution failed Cell 22: Cell execution caused an exception Input: image_filter(stairs_map, type_="high-pass").opts(framewise=True) Traceback: --------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[1], line 1 ----> 1 image_filter(stairs_map, type_="high-pass").opts(framewise=True) NameError: name 'stairs_map' is not defined
unit:test-312:ubuntu-latest: examples/gallery/demos/bokeh/histogram_example.ipynb#L1
examples/gallery/demos/bokeh/histogram_example.ipynb::Cell 1 Notebook cell execution failed Cell 1: Cell execution caused an exception Input: def get_overlay(hist, x, pdf, cdf, label): pdf = hv.Curve((x, pdf), label='PDF') cdf = hv.Curve((x, cdf), label='CDF') return (hv.Histogram(hist, vdims='P(r)') * pdf * cdf).relabel(label) np.seterr(divide='ignore', invalid='ignore') label = "Normal Distribution (μ=0, σ=0.5)" mu, sigma = 0, 0.5 measured = np.random.normal(mu, sigma, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(-2, 2, 1000) pdf = 1/(sigma * np.sqrt(2*np.pi)) * np.exp(-(x-mu)**2 / (2*sigma**2)) cdf = (1+scipy.special.erf((x-mu)/np.sqrt(2*sigma**2)))/2 norm = get_overlay(hist, x, pdf, cdf, label) label = "Log Normal Distribution (μ=0, σ=0.5)" mu, sigma = 0, 0.5 measured = np.random.lognormal(mu, sigma, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 8.0, 1000) pdf = 1/(x* sigma * np.sqrt(2*np.pi)) * np.exp(-(np.log(x)-mu)**2 / (2*sigma**2)) cdf = (1+scipy.special.erf((np.log(x)-mu)/(np.sqrt(2)*sigma)))/2 lognorm = get_overlay(hist, x, pdf, cdf, label) label = "Gamma Distribution (k=1, θ=2)" k, theta = 1.0, 2.0 measured = np.random.gamma(k, theta, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 20.0, 1000) pdf = x**(k-1) * np.exp(-x/theta) / (theta**k * scipy.special.gamma(k)) cdf = scipy.special.gammainc(k, x/theta) / scipy.special.gamma(k) gamma = get_overlay(hist, x, pdf, cdf, label) label = "Beta Distribution (α=2, β=2)" alpha, beta = 2.0, 2.0 measured = np.random.beta(alpha, beta, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 1, 1000) pdf = x**(alpha-1) * (1-x)**(beta-1) / scipy.special.beta(alpha, beta) cdf = scipy.special.btdtr(alpha, beta, x) beta = get_overlay(hist, x, pdf, cdf, label) label = "Weibull Distribution (λ=1, k=1.25)" lam, k = 1, 1.25 measured = lam*(-np.log(np.random.uniform(0, 1, 1000)))**(1/k) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 8, 1000) pdf = (k/lam)*(x/lam)**(k-1) * np.exp(-(x/lam)**k) cdf = 1 - np.exp(-(x/lam)**k) weibull = get_overlay(hist, x, pdf, cdf, label) Traceback: --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In[1], line 52 50 x = np.linspace(0, 1, 1000) 51 pdf = x**(alpha-1) * (1-x)**(beta-1) / scipy.special.beta(alpha, beta) ---> 52 cdf = scipy.special.btdtr(alpha, beta, x) 53 beta = get_overlay(hist, x, pdf, cdf, label) 56 label = "Weibull Distribution (λ=1, k=1.25)" AttributeError: module 'scipy.special' has no attribute 'btdtr'
unit:test-312:ubuntu-latest: examples/gallery/demos/bokeh/histogram_example.ipynb#L1
examples/gallery/demos/bokeh/histogram_example.ipynb::Cell 2 Notebook cell execution failed Cell 2: Cell execution caused an exception Input: layout = (norm + lognorm + gamma + beta + weibull).cols(2) layout.opts( opts.Curve(axiswise=True), opts.Histogram(fill_color="#036564", axiswise=True, height=350, width=350, bgcolor="#E8DDCB"), opts.Layout(shared_axes=False)) Traceback: --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In[1], line 1 ----> 1 layout = (norm + lognorm + gamma + beta + weibull).cols(2) 2 layout.opts( 3 opts.Curve(axiswise=True), 4 opts.Histogram(fill_color="#036564", axiswise=True, height=350, width=350, bgcolor="#E8DDCB"), 5 opts.Layout(shared_axes=False)) File ~/work/holoviews/holoviews/holoviews/core/layout.py:30, in Layoutable.__add__(x, y) 24 raise TypeError(f"unsupported operand type(s) for +: {x.__class__.__name__} and {y.__class__.__name__}. " 25 "If you are trying to use a reduction like `sum(elements)` " 26 "to combine a list of elements, we recommend you use " 27 "`Layout(elements)` (and similarly `Overlay(elements)` for " 28 "making an overlay from a list) instead.") 29 try: ---> 30 return Layout([x, y]) 31 except NotImplementedError: 32 return NotImplemented File ~/work/holoviews/holoviews/holoviews/core/layout.py:442, in Layout.__init__(self, items, identifier, parent, **kwargs) 440 def __init__(self, items=None, identifier=None, parent=None, **kwargs): 441 self.__dict__['_max_cols'] = 4 --> 442 super().__init__(items, identifier, parent, **kwargs) File ~/work/holoviews/holoviews/holoviews/core/di
unit:test-312:ubuntu-latest: examples/gallery/demos/matplotlib/histogram_example.ipynb#L1
examples/gallery/demos/matplotlib/histogram_example.ipynb::Cell 1 Notebook cell execution failed Cell 1: Cell execution caused an exception Input: def get_overlay(hist, x, pdf, cdf, label): pdf = hv.Curve((x, pdf), label='PDF') cdf = hv.Curve((x, cdf), label='CDF') return (hv.Histogram(hist, vdims='P(r)') * pdf * cdf).relabel(label) label = "Normal Distribution (μ=0, σ=0.5)" mu, sigma = 0, 0.5 measured = np.random.normal(mu, sigma, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(-2, 2, 1000) pdf = 1/(sigma * np.sqrt(2*np.pi)) * np.exp(-(x-mu)**2 / (2*sigma**2)) cdf = (1+scipy.special.erf((x-mu)/np.sqrt(2*sigma**2)))/2 norm = get_overlay(hist, x, pdf, cdf, label) np.seterr(divide='ignore', invalid='ignore') label = "Log Normal Distribution (μ=0, σ=0.5)" mu, sigma = 0, 0.5 measured = np.random.lognormal(mu, sigma, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 8.0, 1000) pdf = 1/(x* sigma * np.sqrt(2*np.pi)) * np.exp(-(np.log(x)-mu)**2 / (2*sigma**2)) cdf = (1+scipy.special.erf((np.log(x)-mu)/(np.sqrt(2)*sigma)))/2 lognorm = get_overlay(hist, x, pdf, cdf, label) label = "Gamma Distribution (k=1, θ=2)" k, theta = 1.0, 2.0 measured = np.random.gamma(k, theta, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 20.0, 1000) pdf = x**(k-1) * np.exp(-x/theta) / (theta**k * scipy.special.gamma(k)) cdf = scipy.special.gammainc(k, x/theta) / scipy.special.gamma(k) gamma = get_overlay(hist, x, pdf, cdf, label) label = "Beta Distribution (α=2, β=2)" alpha, beta = 2.0, 2.0 measured = np.random.beta(alpha, beta, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 1, 1000) pdf = x**(alpha-1) * (1-x)**(beta-1) / scipy.special.beta(alpha, beta) cdf = scipy.special.btdtr(alpha, beta, x) beta = get_overlay(hist, x, pdf, cdf, label) label = "Weibull Distribution (λ=1, k=1.25)" lam, k = 1, 1.25 measured = lam*(-np.log(np.random.uniform(0, 1, 1000)))**(1/k) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 8, 1000) pdf = (k/lam)*(x/lam)**(k-1) * np.exp(-(x/lam)**k) cdf = 1 - np.exp(-(x/lam)**k) weibull = get_overlay(hist, x, pdf, cdf, label) Traceback: --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In[1], line 52 50 x = np.linspace(0, 1, 1000) 51 pdf = x**(alpha-1) * (1-x)**(beta-1) / scipy.special.beta(alpha, beta) ---> 52 cdf = scipy.special.btdtr(alpha, beta, x) 53 beta = get_overlay(hist, x, pdf, cdf, label) 56 label = "Weibull Distribution (λ=1, k=1.25)" AttributeError: module 'scipy.special' has no attribute 'btdtr'
unit:test-312:ubuntu-latest: examples/gallery/demos/matplotlib/histogram_example.ipynb#L1
examples/gallery/demos/matplotlib/histogram_example.ipynb::Cell 2 Notebook cell execution failed Cell 2: Cell execution caused an exception Input: (norm + lognorm + gamma + beta + weibull).opts( opts.Curve(axiswise=True), opts.Histogram(facecolor="#036564", axiswise=True, bgcolor="#E8DDCB"), opts.Layout(hspace=0.2)).cols(2) Traceback: --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In[1], line 1 ----> 1 (norm + lognorm + gamma + beta + weibull).opts( 2 opts.Curve(axiswise=True), 3 opts.Histogram(facecolor="#036564", axiswise=True, bgcolor="#E8DDCB"), 4 opts.Layout(hspace=0.2)).cols(2) File ~/work/holoviews/holoviews/holoviews/core/layout.py:30, in Layoutable.__add__(x, y) 24 raise TypeError(f"unsupported operand type(s) for +: {x.__class__.__name__} and {y.__class__.__name__}. " 25 "If you are trying to use a reduction like `sum(elements)` " 26 "to combine a list of elements, we recommend you use " 27 "`Layout(elements)` (and similarly `Overlay(elements)` for " 28 "making an overlay from a list) instead.") 29 try: ---> 30 return Layout([x, y]) 31 except NotImplementedError: 32 return NotImplemented File ~/work/holoviews/holoviews/holoviews/core/layout.py:442, in Layout.__init__(self, items, identifier, parent, **kwargs) 440 def __init__(self, items=None, identifier=None, parent=None, **kwargs): 441 self.__dict__['_max_cols'] = 4 --> 442 super().__init__(items, identifier, parent, **kwargs) File ~/work/holoviews/holoviews/holoviews/core/dimension.py:1313, in ViewableTree.__init__(self, items, identifier, parent, **kwargs) 1310 items = self._
unit:test-312:ubuntu-latest
Process completed with exit code 1.
unit:test-311:ubuntu-latest: examples/user_guide/11-Transforming_Elements.ipynb#L1
examples/user_guide/11-Transforming_Elements.ipynb::Cell 20 Notebook cell execution failed Cell 20: Cell execution caused an exception Input: hv.output(backend='matplotlib', size=200) from scipy.misc import ascent stairs_image = hv.Image(ascent()[200:500, :], bounds=[0, 0, ascent().shape[1], 300], label="stairs") stairs_image Traceback: --------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[1], line 3 1 hv.output(backend='matplotlib', size=200) ----> 3 from scipy.misc import ascent 5 stairs_image = hv.Image(ascent()[200:500, :], bounds=[0, 0, ascent().shape[1], 300], label="stairs") 6 stairs_image ImportError: cannot import name 'ascent' from 'scipy.misc' (/home/runner/work/holoviews/holoviews/.pixi/envs/test-311/lib/python3.11/site-packages/scipy/misc/__init__.py)
unit:test-311:ubuntu-latest: examples/user_guide/11-Transforming_Elements.ipynb#L1
examples/user_guide/11-Transforming_Elements.ipynb::Cell 21 Notebook cell execution failed Cell 21: Cell execution caused an exception Input: from scipy import ndimage class image_filter(hv.Operation): sigma = param.Number(default=5) type_ = param.String(default="low-pass") def _process(self, element, key=None): xs = element.dimension_values(0, expanded=False) ys = element.dimension_values(1, expanded=False) # setting flat=False will preserve the matrix shape data = element.dimension_values(2, flat=False) if self.p.type_ == "high-pass": new_data = data - ndimage.gaussian_filter(data, self.p.sigma) else: new_data = ndimage.gaussian_filter(data, self.p.sigma) label = element.label + " ({} filtered)".format(self.p.type_) # make an exact copy of the element with all settings, just with different data and label: element = element.clone((xs, ys, new_data), label=label) return element stairs_map = hv.HoloMap({sigma: image_filter(stairs_image, sigma=sigma) for sigma in range(0, 12, 1)}, kdims="sigma") stairs_map.opts(framewise=True) Traceback: --------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[1], line 26 23 element = element.clone((xs, ys, new_data), label=label) 24 return element ---> 26 stairs_map = hv.HoloMap({sigma: image_filter(stairs_image, sigma=sigma) 27 for sigma in range(0, 12, 1)}, kdims="sigma") 29 stairs_map.opts(framewise=True) Cell In[1], line 26, in <dictcomp>(.0) 23 element = element.clone((xs, ys, new_data), label=label) 24 return element ---> 26 stairs_map = hv.HoloMap({sigma: image_filter(stairs_image, sigma=sigma) 27 for sigma in range(0, 12, 1)}, kdims="sigma") 29 stairs_map.opts(framewise=True) NameError: name 'stairs_image' is not defined
unit:test-311:ubuntu-latest: examples/user_guide/11-Transforming_Elements.ipynb#L1
examples/user_guide/11-Transforming_Elements.ipynb::Cell 22 Notebook cell execution failed Cell 22: Cell execution caused an exception Input: image_filter(stairs_map, type_="high-pass").opts(framewise=True) Traceback: --------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[1], line 1 ----> 1 image_filter(stairs_map, type_="high-pass").opts(framewise=True) NameError: name 'stairs_map' is not defined
unit:test-311:ubuntu-latest: examples/gallery/demos/bokeh/histogram_example.ipynb#L1
examples/gallery/demos/bokeh/histogram_example.ipynb::Cell 1 Notebook cell execution failed Cell 1: Cell execution caused an exception Input: def get_overlay(hist, x, pdf, cdf, label): pdf = hv.Curve((x, pdf), label='PDF') cdf = hv.Curve((x, cdf), label='CDF') return (hv.Histogram(hist, vdims='P(r)') * pdf * cdf).relabel(label) np.seterr(divide='ignore', invalid='ignore') label = "Normal Distribution (μ=0, σ=0.5)" mu, sigma = 0, 0.5 measured = np.random.normal(mu, sigma, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(-2, 2, 1000) pdf = 1/(sigma * np.sqrt(2*np.pi)) * np.exp(-(x-mu)**2 / (2*sigma**2)) cdf = (1+scipy.special.erf((x-mu)/np.sqrt(2*sigma**2)))/2 norm = get_overlay(hist, x, pdf, cdf, label) label = "Log Normal Distribution (μ=0, σ=0.5)" mu, sigma = 0, 0.5 measured = np.random.lognormal(mu, sigma, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 8.0, 1000) pdf = 1/(x* sigma * np.sqrt(2*np.pi)) * np.exp(-(np.log(x)-mu)**2 / (2*sigma**2)) cdf = (1+scipy.special.erf((np.log(x)-mu)/(np.sqrt(2)*sigma)))/2 lognorm = get_overlay(hist, x, pdf, cdf, label) label = "Gamma Distribution (k=1, θ=2)" k, theta = 1.0, 2.0 measured = np.random.gamma(k, theta, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 20.0, 1000) pdf = x**(k-1) * np.exp(-x/theta) / (theta**k * scipy.special.gamma(k)) cdf = scipy.special.gammainc(k, x/theta) / scipy.special.gamma(k) gamma = get_overlay(hist, x, pdf, cdf, label) label = "Beta Distribution (α=2, β=2)" alpha, beta = 2.0, 2.0 measured = np.random.beta(alpha, beta, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 1, 1000) pdf = x**(alpha-1) * (1-x)**(beta-1) / scipy.special.beta(alpha, beta) cdf = scipy.special.btdtr(alpha, beta, x) beta = get_overlay(hist, x, pdf, cdf, label) label = "Weibull Distribution (λ=1, k=1.25)" lam, k = 1, 1.25 measured = lam*(-np.log(np.random.uniform(0, 1, 1000)))**(1/k) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 8, 1000) pdf = (k/lam)*(x/lam)**(k-1) * np.exp(-(x/lam)**k) cdf = 1 - np.exp(-(x/lam)**k) weibull = get_overlay(hist, x, pdf, cdf, label) Traceback: --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In[1], line 52 50 x = np.linspace(0, 1, 1000) 51 pdf = x**(alpha-1) * (1-x)**(beta-1) / scipy.special.beta(alpha, beta) ---> 52 cdf = scipy.special.btdtr(alpha, beta, x) 53 beta = get_overlay(hist, x, pdf, cdf, label) 56 label = "Weibull Distribution (λ=1, k=1.25)" AttributeError: module 'scipy.special' has no attribute 'btdtr'
unit:test-311:ubuntu-latest: examples/gallery/demos/bokeh/histogram_example.ipynb#L1
examples/gallery/demos/bokeh/histogram_example.ipynb::Cell 2 Notebook cell execution failed Cell 2: Cell execution caused an exception Input: layout = (norm + lognorm + gamma + beta + weibull).cols(2) layout.opts( opts.Curve(axiswise=True), opts.Histogram(fill_color="#036564", axiswise=True, height=350, width=350, bgcolor="#E8DDCB"), opts.Layout(shared_axes=False)) Traceback: --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In[1], line 1 ----> 1 layout = (norm + lognorm + gamma + beta + weibull).cols(2) 2 layout.opts( 3 opts.Curve(axiswise=True), 4 opts.Histogram(fill_color="#036564", axiswise=True, height=350, width=350, bgcolor="#E8DDCB"), 5 opts.Layout(shared_axes=False)) File ~/work/holoviews/holoviews/holoviews/core/layout.py:30, in Layoutable.__add__(x, y) 24 raise TypeError(f"unsupported operand type(s) for +: {x.__class__.__name__} and {y.__class__.__name__}. " 25 "If you are trying to use a reduction like `sum(elements)` " 26 "to combine a list of elements, we recommend you use " 27 "`Layout(elements)` (and similarly `Overlay(elements)` for " 28 "making an overlay from a list) instead.") 29 try: ---> 30 return Layout([x, y]) 31 except NotImplementedError: 32 return NotImplemented File ~/work/holoviews/holoviews/holoviews/core/layout.py:442, in Layout.__init__(self, items, identifier, parent, **kwargs) 440 def __init__(self, items=None, identifier=None, parent=None, **kwargs): 441 self.__dict__['_max_cols'] = 4 --> 442 super().__init__(items, identifier, parent, **kwargs) File ~/work/holoviews/holoviews/holoviews/core/di
unit:test-311:ubuntu-latest: examples/gallery/demos/matplotlib/histogram_example.ipynb#L1
examples/gallery/demos/matplotlib/histogram_example.ipynb::Cell 1 Notebook cell execution failed Cell 1: Cell execution caused an exception Input: def get_overlay(hist, x, pdf, cdf, label): pdf = hv.Curve((x, pdf), label='PDF') cdf = hv.Curve((x, cdf), label='CDF') return (hv.Histogram(hist, vdims='P(r)') * pdf * cdf).relabel(label) label = "Normal Distribution (μ=0, σ=0.5)" mu, sigma = 0, 0.5 measured = np.random.normal(mu, sigma, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(-2, 2, 1000) pdf = 1/(sigma * np.sqrt(2*np.pi)) * np.exp(-(x-mu)**2 / (2*sigma**2)) cdf = (1+scipy.special.erf((x-mu)/np.sqrt(2*sigma**2)))/2 norm = get_overlay(hist, x, pdf, cdf, label) np.seterr(divide='ignore', invalid='ignore') label = "Log Normal Distribution (μ=0, σ=0.5)" mu, sigma = 0, 0.5 measured = np.random.lognormal(mu, sigma, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 8.0, 1000) pdf = 1/(x* sigma * np.sqrt(2*np.pi)) * np.exp(-(np.log(x)-mu)**2 / (2*sigma**2)) cdf = (1+scipy.special.erf((np.log(x)-mu)/(np.sqrt(2)*sigma)))/2 lognorm = get_overlay(hist, x, pdf, cdf, label) label = "Gamma Distribution (k=1, θ=2)" k, theta = 1.0, 2.0 measured = np.random.gamma(k, theta, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 20.0, 1000) pdf = x**(k-1) * np.exp(-x/theta) / (theta**k * scipy.special.gamma(k)) cdf = scipy.special.gammainc(k, x/theta) / scipy.special.gamma(k) gamma = get_overlay(hist, x, pdf, cdf, label) label = "Beta Distribution (α=2, β=2)" alpha, beta = 2.0, 2.0 measured = np.random.beta(alpha, beta, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 1, 1000) pdf = x**(alpha-1) * (1-x)**(beta-1) / scipy.special.beta(alpha, beta) cdf = scipy.special.btdtr(alpha, beta, x) beta = get_overlay(hist, x, pdf, cdf, label) label = "Weibull Distribution (λ=1, k=1.25)" lam, k = 1, 1.25 measured = lam*(-np.log(np.random.uniform(0, 1, 1000)))**(1/k) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 8, 1000) pdf = (k/lam)*(x/lam)**(k-1) * np.exp(-(x/lam)**k) cdf = 1 - np.exp(-(x/lam)**k) weibull = get_overlay(hist, x, pdf, cdf, label) Traceback: --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In[1], line 52 50 x = np.linspace(0, 1, 1000) 51 pdf = x**(alpha-1) * (1-x)**(beta-1) / scipy.special.beta(alpha, beta) ---> 52 cdf = scipy.special.btdtr(alpha, beta, x) 53 beta = get_overlay(hist, x, pdf, cdf, label) 56 label = "Weibull Distribution (λ=1, k=1.25)" AttributeError: module 'scipy.special' has no attribute 'btdtr'
unit:test-311:ubuntu-latest: examples/gallery/demos/matplotlib/histogram_example.ipynb#L1
examples/gallery/demos/matplotlib/histogram_example.ipynb::Cell 2 Notebook cell execution failed Cell 2: Cell execution caused an exception Input: (norm + lognorm + gamma + beta + weibull).opts( opts.Curve(axiswise=True), opts.Histogram(facecolor="#036564", axiswise=True, bgcolor="#E8DDCB"), opts.Layout(hspace=0.2)).cols(2) Traceback: --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In[1], line 1 ----> 1 (norm + lognorm + gamma + beta + weibull).opts( 2 opts.Curve(axiswise=True), 3 opts.Histogram(facecolor="#036564", axiswise=True, bgcolor="#E8DDCB"), 4 opts.Layout(hspace=0.2)).cols(2) File ~/work/holoviews/holoviews/holoviews/core/layout.py:30, in Layoutable.__add__(x, y) 24 raise TypeError(f"unsupported operand type(s) for +: {x.__class__.__name__} and {y.__class__.__name__}. " 25 "If you are trying to use a reduction like `sum(elements)` " 26 "to combine a list of elements, we recommend you use " 27 "`Layout(elements)` (and similarly `Overlay(elements)` for " 28 "making an overlay from a list) instead.") 29 try: ---> 30 return Layout([x, y]) 31 except NotImplementedError: 32 return NotImplemented File ~/work/holoviews/holoviews/holoviews/core/layout.py:442, in Layout.__init__(self, items, identifier, parent, **kwargs) 440 def __init__(self, items=None, identifier=None, parent=None, **kwargs): 441 self.__dict__['_max_cols'] = 4 --> 442 super().__init__(items, identifier, parent, **kwargs) File ~/work/holoviews/holoviews/holoviews/core/dimension.py:1313, in ViewableTree.__init__(self, items, identifier, parent, **kwargs) 1310 items = self._
unit:test-311:ubuntu-latest
Process completed with exit code 1.
unit:test-310:ubuntu-latest: examples/user_guide/11-Transforming_Elements.ipynb#L1
examples/user_guide/11-Transforming_Elements.ipynb::Cell 20 Notebook cell execution failed Cell 20: Cell execution caused an exception Input: hv.output(backend='matplotlib', size=200) from scipy.misc import ascent stairs_image = hv.Image(ascent()[200:500, :], bounds=[0, 0, ascent().shape[1], 300], label="stairs") stairs_image Traceback: --------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[1], line 3 1 hv.output(backend='matplotlib', size=200) ----> 3 from scipy.misc import ascent 5 stairs_image = hv.Image(ascent()[200:500, :], bounds=[0, 0, ascent().shape[1], 300], label="stairs") 6 stairs_image ImportError: cannot import name 'ascent' from 'scipy.misc' (/home/runner/work/holoviews/holoviews/.pixi/envs/test-310/lib/python3.10/site-packages/scipy/misc/__init__.py)
unit:test-310:ubuntu-latest: examples/user_guide/11-Transforming_Elements.ipynb#L1
examples/user_guide/11-Transforming_Elements.ipynb::Cell 21 Notebook cell execution failed Cell 21: Cell execution caused an exception Input: from scipy import ndimage class image_filter(hv.Operation): sigma = param.Number(default=5) type_ = param.String(default="low-pass") def _process(self, element, key=None): xs = element.dimension_values(0, expanded=False) ys = element.dimension_values(1, expanded=False) # setting flat=False will preserve the matrix shape data = element.dimension_values(2, flat=False) if self.p.type_ == "high-pass": new_data = data - ndimage.gaussian_filter(data, self.p.sigma) else: new_data = ndimage.gaussian_filter(data, self.p.sigma) label = element.label + " ({} filtered)".format(self.p.type_) # make an exact copy of the element with all settings, just with different data and label: element = element.clone((xs, ys, new_data), label=label) return element stairs_map = hv.HoloMap({sigma: image_filter(stairs_image, sigma=sigma) for sigma in range(0, 12, 1)}, kdims="sigma") stairs_map.opts(framewise=True) Traceback: --------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[1], line 26 23 element = element.clone((xs, ys, new_data), label=label) 24 return element ---> 26 stairs_map = hv.HoloMap({sigma: image_filter(stairs_image, sigma=sigma) 27 for sigma in range(0, 12, 1)}, kdims="sigma") 29 stairs_map.opts(framewise=True) Cell In[1], line 26, in <dictcomp>(.0) 23 element = element.clone((xs, ys, new_data), label=label) 24 return element ---> 26 stairs_map = hv.HoloMap({sigma: image_filter(stairs_image, sigma=sigma) 27 for sigma in range(0, 12, 1)}, kdims="sigma") 29 stairs_map.opts(framewise=True) NameError: name 'stairs_image' is not defined
unit:test-310:ubuntu-latest: examples/user_guide/11-Transforming_Elements.ipynb#L1
examples/user_guide/11-Transforming_Elements.ipynb::Cell 22 Notebook cell execution failed Cell 22: Cell execution caused an exception Input: image_filter(stairs_map, type_="high-pass").opts(framewise=True) Traceback: --------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[1], line 1 ----> 1 image_filter(stairs_map, type_="high-pass").opts(framewise=True) NameError: name 'stairs_map' is not defined
unit:test-310:ubuntu-latest: examples/gallery/demos/bokeh/histogram_example.ipynb#L1
examples/gallery/demos/bokeh/histogram_example.ipynb::Cell 1 Notebook cell execution failed Cell 1: Cell execution caused an exception Input: def get_overlay(hist, x, pdf, cdf, label): pdf = hv.Curve((x, pdf), label='PDF') cdf = hv.Curve((x, cdf), label='CDF') return (hv.Histogram(hist, vdims='P(r)') * pdf * cdf).relabel(label) np.seterr(divide='ignore', invalid='ignore') label = "Normal Distribution (μ=0, σ=0.5)" mu, sigma = 0, 0.5 measured = np.random.normal(mu, sigma, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(-2, 2, 1000) pdf = 1/(sigma * np.sqrt(2*np.pi)) * np.exp(-(x-mu)**2 / (2*sigma**2)) cdf = (1+scipy.special.erf((x-mu)/np.sqrt(2*sigma**2)))/2 norm = get_overlay(hist, x, pdf, cdf, label) label = "Log Normal Distribution (μ=0, σ=0.5)" mu, sigma = 0, 0.5 measured = np.random.lognormal(mu, sigma, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 8.0, 1000) pdf = 1/(x* sigma * np.sqrt(2*np.pi)) * np.exp(-(np.log(x)-mu)**2 / (2*sigma**2)) cdf = (1+scipy.special.erf((np.log(x)-mu)/(np.sqrt(2)*sigma)))/2 lognorm = get_overlay(hist, x, pdf, cdf, label) label = "Gamma Distribution (k=1, θ=2)" k, theta = 1.0, 2.0 measured = np.random.gamma(k, theta, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 20.0, 1000) pdf = x**(k-1) * np.exp(-x/theta) / (theta**k * scipy.special.gamma(k)) cdf = scipy.special.gammainc(k, x/theta) / scipy.special.gamma(k) gamma = get_overlay(hist, x, pdf, cdf, label) label = "Beta Distribution (α=2, β=2)" alpha, beta = 2.0, 2.0 measured = np.random.beta(alpha, beta, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 1, 1000) pdf = x**(alpha-1) * (1-x)**(beta-1) / scipy.special.beta(alpha, beta) cdf = scipy.special.btdtr(alpha, beta, x) beta = get_overlay(hist, x, pdf, cdf, label) label = "Weibull Distribution (λ=1, k=1.25)" lam, k = 1, 1.25 measured = lam*(-np.log(np.random.uniform(0, 1, 1000)))**(1/k) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 8, 1000) pdf = (k/lam)*(x/lam)**(k-1) * np.exp(-(x/lam)**k) cdf = 1 - np.exp(-(x/lam)**k) weibull = get_overlay(hist, x, pdf, cdf, label) Traceback: --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In[1], line 52 50 x = np.linspace(0, 1, 1000) 51 pdf = x**(alpha-1) * (1-x)**(beta-1) / scipy.special.beta(alpha, beta) ---> 52 cdf = scipy.special.btdtr(alpha, beta, x) 53 beta = get_overlay(hist, x, pdf, cdf, label) 56 label = "Weibull Distribution (λ=1, k=1.25)" AttributeError: module 'scipy.special' has no attribute 'btdtr'
unit:test-310:ubuntu-latest: examples/gallery/demos/bokeh/histogram_example.ipynb#L1
examples/gallery/demos/bokeh/histogram_example.ipynb::Cell 2 Notebook cell execution failed Cell 2: Cell execution caused an exception Input: layout = (norm + lognorm + gamma + beta + weibull).cols(2) layout.opts( opts.Curve(axiswise=True), opts.Histogram(fill_color="#036564", axiswise=True, height=350, width=350, bgcolor="#E8DDCB"), opts.Layout(shared_axes=False)) Traceback: --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In[1], line 1 ----> 1 layout = (norm + lognorm + gamma + beta + weibull).cols(2) 2 layout.opts( 3 opts.Curve(axiswise=True), 4 opts.Histogram(fill_color="#036564", axiswise=True, height=350, width=350, bgcolor="#E8DDCB"), 5 opts.Layout(shared_axes=False)) File ~/work/holoviews/holoviews/holoviews/core/layout.py:30, in Layoutable.__add__(x, y) 24 raise TypeError(f"unsupported operand type(s) for +: {x.__class__.__name__} and {y.__class__.__name__}. " 25 "If you are trying to use a reduction like `sum(elements)` " 26 "to combine a list of elements, we recommend you use " 27 "`Layout(elements)` (and similarly `Overlay(elements)` for " 28 "making an overlay from a list) instead.") 29 try: ---> 30 return Layout([x, y]) 31 except NotImplementedError: 32 return NotImplemented File ~/work/holoviews/holoviews/holoviews/core/layout.py:442, in Layout.__init__(self, items, identifier, parent, **kwargs) 440 def __init__(self, items=None, identifier=None, parent=None, **kwargs): 441 self.__dict__['_max_cols'] = 4 --> 442 super().__init__(items, identifier, parent, **kwargs) File ~/work/holoviews/holoviews/holoviews/core/di
unit:test-310:ubuntu-latest: examples/gallery/demos/matplotlib/histogram_example.ipynb#L1
examples/gallery/demos/matplotlib/histogram_example.ipynb::Cell 1 Notebook cell execution failed Cell 1: Cell execution caused an exception Input: def get_overlay(hist, x, pdf, cdf, label): pdf = hv.Curve((x, pdf), label='PDF') cdf = hv.Curve((x, cdf), label='CDF') return (hv.Histogram(hist, vdims='P(r)') * pdf * cdf).relabel(label) label = "Normal Distribution (μ=0, σ=0.5)" mu, sigma = 0, 0.5 measured = np.random.normal(mu, sigma, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(-2, 2, 1000) pdf = 1/(sigma * np.sqrt(2*np.pi)) * np.exp(-(x-mu)**2 / (2*sigma**2)) cdf = (1+scipy.special.erf((x-mu)/np.sqrt(2*sigma**2)))/2 norm = get_overlay(hist, x, pdf, cdf, label) np.seterr(divide='ignore', invalid='ignore') label = "Log Normal Distribution (μ=0, σ=0.5)" mu, sigma = 0, 0.5 measured = np.random.lognormal(mu, sigma, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 8.0, 1000) pdf = 1/(x* sigma * np.sqrt(2*np.pi)) * np.exp(-(np.log(x)-mu)**2 / (2*sigma**2)) cdf = (1+scipy.special.erf((np.log(x)-mu)/(np.sqrt(2)*sigma)))/2 lognorm = get_overlay(hist, x, pdf, cdf, label) label = "Gamma Distribution (k=1, θ=2)" k, theta = 1.0, 2.0 measured = np.random.gamma(k, theta, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 20.0, 1000) pdf = x**(k-1) * np.exp(-x/theta) / (theta**k * scipy.special.gamma(k)) cdf = scipy.special.gammainc(k, x/theta) / scipy.special.gamma(k) gamma = get_overlay(hist, x, pdf, cdf, label) label = "Beta Distribution (α=2, β=2)" alpha, beta = 2.0, 2.0 measured = np.random.beta(alpha, beta, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 1, 1000) pdf = x**(alpha-1) * (1-x)**(beta-1) / scipy.special.beta(alpha, beta) cdf = scipy.special.btdtr(alpha, beta, x) beta = get_overlay(hist, x, pdf, cdf, label) label = "Weibull Distribution (λ=1, k=1.25)" lam, k = 1, 1.25 measured = lam*(-np.log(np.random.uniform(0, 1, 1000)))**(1/k) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 8, 1000) pdf = (k/lam)*(x/lam)**(k-1) * np.exp(-(x/lam)**k) cdf = 1 - np.exp(-(x/lam)**k) weibull = get_overlay(hist, x, pdf, cdf, label) Traceback: --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In[1], line 52 50 x = np.linspace(0, 1, 1000) 51 pdf = x**(alpha-1) * (1-x)**(beta-1) / scipy.special.beta(alpha, beta) ---> 52 cdf = scipy.special.btdtr(alpha, beta, x) 53 beta = get_overlay(hist, x, pdf, cdf, label) 56 label = "Weibull Distribution (λ=1, k=1.25)" AttributeError: module 'scipy.special' has no attribute 'btdtr'
unit:test-310:ubuntu-latest: examples/gallery/demos/matplotlib/histogram_example.ipynb#L1
examples/gallery/demos/matplotlib/histogram_example.ipynb::Cell 2 Notebook cell execution failed Cell 2: Cell execution caused an exception Input: (norm + lognorm + gamma + beta + weibull).opts( opts.Curve(axiswise=True), opts.Histogram(facecolor="#036564", axiswise=True, bgcolor="#E8DDCB"), opts.Layout(hspace=0.2)).cols(2) Traceback: --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In[1], line 1 ----> 1 (norm + lognorm + gamma + beta + weibull).opts( 2 opts.Curve(axiswise=True), 3 opts.Histogram(facecolor="#036564", axiswise=True, bgcolor="#E8DDCB"), 4 opts.Layout(hspace=0.2)).cols(2) File ~/work/holoviews/holoviews/holoviews/core/layout.py:30, in Layoutable.__add__(x, y) 24 raise TypeError(f"unsupported operand type(s) for +: {x.__class__.__name__} and {y.__class__.__name__}. " 25 "If you are trying to use a reduction like `sum(elements)` " 26 "to combine a list of elements, we recommend you use " 27 "`Layout(elements)` (and similarly `Overlay(elements)` for " 28 "making an overlay from a list) instead.") 29 try: ---> 30 return Layout([x, y]) 31 except NotImplementedError: 32 return NotImplemented File ~/work/holoviews/holoviews/holoviews/core/layout.py:442, in Layout.__init__(self, items, identifier, parent, **kwargs) 440 def __init__(self, items=None, identifier=None, parent=None, **kwargs): 441 self.__dict__['_max_cols'] = 4 --> 442 super().__init__(items, identifier, parent, **kwargs) File ~/work/holoviews/holoviews/holoviews/core/dimension.py:1313, in ViewableTree.__init__(self, items, identifier, parent, **kwargs) 1310 items = self._
unit:test-310:ubuntu-latest
Process completed with exit code 1.
unit:test-312:windows-latest: examples\user_guide\11-Transforming_Elements.ipynb#L1
examples\user_guide\11-Transforming_Elements.ipynb::Cell 20 Notebook cell execution failed Cell 20: Cell execution caused an exception Input: hv.output(backend='matplotlib', size=200) from scipy.misc import ascent stairs_image = hv.Image(ascent()[200:500, :], bounds=[0, 0, ascent().shape[1], 300], label="stairs") stairs_image Traceback: --------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[1], line 3 1 hv.output(backend='matplotlib', size=200) ----> 3 from scipy.misc import ascent 5 stairs_image = hv.Image(ascent()[200:500, :], bounds=[0, 0, ascent().shape[1], 300], label="stairs") 6 stairs_image ImportError: cannot import name 'ascent' from 'scipy.misc' (D:\a\holoviews\holoviews\.pixi\envs\test-312\Lib\site-packages\scipy\misc\__init__.py)
unit:test-312:windows-latest: examples\user_guide\11-Transforming_Elements.ipynb#L1
examples\user_guide\11-Transforming_Elements.ipynb::Cell 21 Notebook cell execution failed Cell 21: Cell execution caused an exception Input: from scipy import ndimage class image_filter(hv.Operation): sigma = param.Number(default=5) type_ = param.String(default="low-pass") def _process(self, element, key=None): xs = element.dimension_values(0, expanded=False) ys = element.dimension_values(1, expanded=False) # setting flat=False will preserve the matrix shape data = element.dimension_values(2, flat=False) if self.p.type_ == "high-pass": new_data = data - ndimage.gaussian_filter(data, self.p.sigma) else: new_data = ndimage.gaussian_filter(data, self.p.sigma) label = element.label + " ({} filtered)".format(self.p.type_) # make an exact copy of the element with all settings, just with different data and label: element = element.clone((xs, ys, new_data), label=label) return element stairs_map = hv.HoloMap({sigma: image_filter(stairs_image, sigma=sigma) for sigma in range(0, 12, 1)}, kdims="sigma") stairs_map.opts(framewise=True) Traceback: --------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[1], line 26 23 element = element.clone((xs, ys, new_data), label=label) 24 return element ---> 26 stairs_map = hv.HoloMap({sigma: image_filter(stairs_image, sigma=sigma) 27 for sigma in range(0, 12, 1)}, kdims="sigma") 29 stairs_map.opts(framewise=True) NameError: name 'stairs_image' is not defined
unit:test-312:windows-latest: examples\user_guide\11-Transforming_Elements.ipynb#L1
examples\user_guide\11-Transforming_Elements.ipynb::Cell 22 Notebook cell execution failed Cell 22: Cell execution caused an exception Input: image_filter(stairs_map, type_="high-pass").opts(framewise=True) Traceback: --------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[1], line 1 ----> 1 image_filter(stairs_map, type_="high-pass").opts(framewise=True) NameError: name 'stairs_map' is not defined
unit:test-312:windows-latest: examples\gallery\demos\bokeh\histogram_example.ipynb#L1
examples\gallery\demos\bokeh\histogram_example.ipynb::Cell 1 Notebook cell execution failed Cell 1: Cell execution caused an exception Input: def get_overlay(hist, x, pdf, cdf, label): pdf = hv.Curve((x, pdf), label='PDF') cdf = hv.Curve((x, cdf), label='CDF') return (hv.Histogram(hist, vdims='P(r)') * pdf * cdf).relabel(label) np.seterr(divide='ignore', invalid='ignore') label = "Normal Distribution (μ=0, σ=0.5)" mu, sigma = 0, 0.5 measured = np.random.normal(mu, sigma, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(-2, 2, 1000) pdf = 1/(sigma * np.sqrt(2*np.pi)) * np.exp(-(x-mu)**2 / (2*sigma**2)) cdf = (1+scipy.special.erf((x-mu)/np.sqrt(2*sigma**2)))/2 norm = get_overlay(hist, x, pdf, cdf, label) label = "Log Normal Distribution (μ=0, σ=0.5)" mu, sigma = 0, 0.5 measured = np.random.lognormal(mu, sigma, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 8.0, 1000) pdf = 1/(x* sigma * np.sqrt(2*np.pi)) * np.exp(-(np.log(x)-mu)**2 / (2*sigma**2)) cdf = (1+scipy.special.erf((np.log(x)-mu)/(np.sqrt(2)*sigma)))/2 lognorm = get_overlay(hist, x, pdf, cdf, label) label = "Gamma Distribution (k=1, θ=2)" k, theta = 1.0, 2.0 measured = np.random.gamma(k, theta, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 20.0, 1000) pdf = x**(k-1) * np.exp(-x/theta) / (theta**k * scipy.special.gamma(k)) cdf = scipy.special.gammainc(k, x/theta) / scipy.special.gamma(k) gamma = get_overlay(hist, x, pdf, cdf, label) label = "Beta Distribution (α=2, β=2)" alpha, beta = 2.0, 2.0 measured = np.random.beta(alpha, beta, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 1, 1000) pdf = x**(alpha-1) * (1-x)**(beta-1) / scipy.special.beta(alpha, beta) cdf = scipy.special.btdtr(alpha, beta, x) beta = get_overlay(hist, x, pdf, cdf, label) label = "Weibull Distribution (λ=1, k=1.25)" lam, k = 1, 1.25 measured = lam*(-np.log(np.random.uniform(0, 1, 1000)))**(1/k) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 8, 1000) pdf = (k/lam)*(x/lam)**(k-1) * np.exp(-(x/lam)**k) cdf = 1 - np.exp(-(x/lam)**k) weibull = get_overlay(hist, x, pdf, cdf, label) Traceback: --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In[1], line 52 50 x = np.linspace(0, 1, 1000) 51 pdf = x**(alpha-1) * (1-x)**(beta-1) / scipy.special.beta(alpha, beta) ---> 52 cdf = scipy.special.btdtr(alpha, beta, x) 53 beta = get_overlay(hist, x, pdf, cdf, label) 56 label = "Weibull Distribution (λ=1, k=1.25)" AttributeError: module 'scipy.special' has no attribute 'btdtr'
unit:test-312:windows-latest: examples\gallery\demos\bokeh\histogram_example.ipynb#L1
examples\gallery\demos\bokeh\histogram_example.ipynb::Cell 2 Notebook cell execution failed Cell 2: Cell execution caused an exception Input: layout = (norm + lognorm + gamma + beta + weibull).cols(2) layout.opts( opts.Curve(axiswise=True), opts.Histogram(fill_color="#036564", axiswise=True, height=350, width=350, bgcolor="#E8DDCB"), opts.Layout(shared_axes=False)) Traceback: --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In[1], line 1 ----> 1 layout = (norm + lognorm + gamma + beta + weibull).cols(2) 2 layout.opts( 3 opts.Curve(axiswise=True), 4 opts.Histogram(fill_color="#036564", axiswise=True, height=350, width=350, bgcolor="#E8DDCB"), 5 opts.Layout(shared_axes=False)) File D:\a\holoviews\holoviews\holoviews\core\layout.py:30, in Layoutable.__add__(x, y) 24 raise TypeError(f"unsupported operand type(s) for +: {x.__class__.__name__} and {y.__class__.__name__}. " 25 "If you are trying to use a reduction like `sum(elements)` " 26 "to combine a list of elements, we recommend you use " 27 "`Layout(elements)` (and similarly `Overlay(elements)` for " 28 "making an overlay from a list) instead.") 29 try: ---> 30 return Layout([x, y]) 31 except NotImplementedError: 32 return NotImplemented File D:\a\holoviews\holoviews\holoviews\core\layout.py:442, in Layout.__init__(self, items, identifier, parent, **kwargs) 440 def __init__(self, items=None, identifier=None, parent=None, **kwargs): 441 self.__dict__['_max_cols'] = 4 --> 442 super().__init__(items, identifier, parent, **kwargs) File D:\a\holoviews\holoviews\holoviews\core\dimensio
unit:test-312:windows-latest: examples\gallery\demos\matplotlib\histogram_example.ipynb#L1
examples\gallery\demos\matplotlib\histogram_example.ipynb::Cell 1 Notebook cell execution failed Cell 1: Cell execution caused an exception Input: def get_overlay(hist, x, pdf, cdf, label): pdf = hv.Curve((x, pdf), label='PDF') cdf = hv.Curve((x, cdf), label='CDF') return (hv.Histogram(hist, vdims='P(r)') * pdf * cdf).relabel(label) label = "Normal Distribution (μ=0, σ=0.5)" mu, sigma = 0, 0.5 measured = np.random.normal(mu, sigma, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(-2, 2, 1000) pdf = 1/(sigma * np.sqrt(2*np.pi)) * np.exp(-(x-mu)**2 / (2*sigma**2)) cdf = (1+scipy.special.erf((x-mu)/np.sqrt(2*sigma**2)))/2 norm = get_overlay(hist, x, pdf, cdf, label) np.seterr(divide='ignore', invalid='ignore') label = "Log Normal Distribution (μ=0, σ=0.5)" mu, sigma = 0, 0.5 measured = np.random.lognormal(mu, sigma, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 8.0, 1000) pdf = 1/(x* sigma * np.sqrt(2*np.pi)) * np.exp(-(np.log(x)-mu)**2 / (2*sigma**2)) cdf = (1+scipy.special.erf((np.log(x)-mu)/(np.sqrt(2)*sigma)))/2 lognorm = get_overlay(hist, x, pdf, cdf, label) label = "Gamma Distribution (k=1, θ=2)" k, theta = 1.0, 2.0 measured = np.random.gamma(k, theta, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 20.0, 1000) pdf = x**(k-1) * np.exp(-x/theta) / (theta**k * scipy.special.gamma(k)) cdf = scipy.special.gammainc(k, x/theta) / scipy.special.gamma(k) gamma = get_overlay(hist, x, pdf, cdf, label) label = "Beta Distribution (α=2, β=2)" alpha, beta = 2.0, 2.0 measured = np.random.beta(alpha, beta, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 1, 1000) pdf = x**(alpha-1) * (1-x)**(beta-1) / scipy.special.beta(alpha, beta) cdf = scipy.special.btdtr(alpha, beta, x) beta = get_overlay(hist, x, pdf, cdf, label) label = "Weibull Distribution (λ=1, k=1.25)" lam, k = 1, 1.25 measured = lam*(-np.log(np.random.uniform(0, 1, 1000)))**(1/k) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 8, 1000) pdf = (k/lam)*(x/lam)**(k-1) * np.exp(-(x/lam)**k) cdf = 1 - np.exp(-(x/lam)**k) weibull = get_overlay(hist, x, pdf, cdf, label) Traceback: --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In[1], line 52 50 x = np.linspace(0, 1, 1000) 51 pdf = x**(alpha-1) * (1-x)**(beta-1) / scipy.special.beta(alpha, beta) ---> 52 cdf = scipy.special.btdtr(alpha, beta, x) 53 beta = get_overlay(hist, x, pdf, cdf, label) 56 label = "Weibull Distribution (λ=1, k=1.25)" AttributeError: module 'scipy.special' has no attribute 'btdtr'
unit:test-312:windows-latest: examples\gallery\demos\matplotlib\histogram_example.ipynb#L1
examples\gallery\demos\matplotlib\histogram_example.ipynb::Cell 2 Notebook cell execution failed Cell 2: Cell execution caused an exception Input: (norm + lognorm + gamma + beta + weibull).opts( opts.Curve(axiswise=True), opts.Histogram(facecolor="#036564", axiswise=True, bgcolor="#E8DDCB"), opts.Layout(hspace=0.2)).cols(2) Traceback: --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In[1], line 1 ----> 1 (norm + lognorm + gamma + beta + weibull).opts( 2 opts.Curve(axiswise=True), 3 opts.Histogram(facecolor="#036564", axiswise=True, bgcolor="#E8DDCB"), 4 opts.Layout(hspace=0.2)).cols(2) File D:\a\holoviews\holoviews\holoviews\core\layout.py:30, in Layoutable.__add__(x, y) 24 raise TypeError(f"unsupported operand type(s) for +: {x.__class__.__name__} and {y.__class__.__name__}. " 25 "If you are trying to use a reduction like `sum(elements)` " 26 "to combine a list of elements, we recommend you use " 27 "`Layout(elements)` (and similarly `Overlay(elements)` for " 28 "making an overlay from a list) instead.") 29 try: ---> 30 return Layout([x, y]) 31 except NotImplementedError: 32 return NotImplemented File D:\a\holoviews\holoviews\holoviews\core\layout.py:442, in Layout.__init__(self, items, identifier, parent, **kwargs) 440 def __init__(self, items=None, identifier=None, parent=None, **kwargs): 441 self.__dict__['_max_cols'] = 4 --> 442 super().__init__(items, identifier, parent, **kwargs) File D:\a\holoviews\holoviews\holoviews\core\dimension.py:1313, in ViewableTree.__init__(self, items, identifier, parent, **kwargs) 1310 items = self._proces
unit:test-312:windows-latest
Process completed with exit code 1.
unit:test-311:windows-latest: examples\user_guide\11-Transforming_Elements.ipynb#L1
examples\user_guide\11-Transforming_Elements.ipynb::Cell 20 Notebook cell execution failed Cell 20: Cell execution caused an exception Input: hv.output(backend='matplotlib', size=200) from scipy.misc import ascent stairs_image = hv.Image(ascent()[200:500, :], bounds=[0, 0, ascent().shape[1], 300], label="stairs") stairs_image Traceback: --------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[1], line 3 1 hv.output(backend='matplotlib', size=200) ----> 3 from scipy.misc import ascent 5 stairs_image = hv.Image(ascent()[200:500, :], bounds=[0, 0, ascent().shape[1], 300], label="stairs") 6 stairs_image ImportError: cannot import name 'ascent' from 'scipy.misc' (D:\a\holoviews\holoviews\.pixi\envs\test-311\Lib\site-packages\scipy\misc\__init__.py)
unit:test-311:windows-latest: examples\user_guide\11-Transforming_Elements.ipynb#L1
examples\user_guide\11-Transforming_Elements.ipynb::Cell 21 Notebook cell execution failed Cell 21: Cell execution caused an exception Input: from scipy import ndimage class image_filter(hv.Operation): sigma = param.Number(default=5) type_ = param.String(default="low-pass") def _process(self, element, key=None): xs = element.dimension_values(0, expanded=False) ys = element.dimension_values(1, expanded=False) # setting flat=False will preserve the matrix shape data = element.dimension_values(2, flat=False) if self.p.type_ == "high-pass": new_data = data - ndimage.gaussian_filter(data, self.p.sigma) else: new_data = ndimage.gaussian_filter(data, self.p.sigma) label = element.label + " ({} filtered)".format(self.p.type_) # make an exact copy of the element with all settings, just with different data and label: element = element.clone((xs, ys, new_data), label=label) return element stairs_map = hv.HoloMap({sigma: image_filter(stairs_image, sigma=sigma) for sigma in range(0, 12, 1)}, kdims="sigma") stairs_map.opts(framewise=True) Traceback: --------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[1], line 26 23 element = element.clone((xs, ys, new_data), label=label) 24 return element ---> 26 stairs_map = hv.HoloMap({sigma: image_filter(stairs_image, sigma=sigma) 27 for sigma in range(0, 12, 1)}, kdims="sigma") 29 stairs_map.opts(framewise=True) Cell In[1], line 26, in <dictcomp>(.0) 23 element = element.clone((xs, ys, new_data), label=label) 24 return element ---> 26 stairs_map = hv.HoloMap({sigma: image_filter(stairs_image, sigma=sigma) 27 for sigma in range(0, 12, 1)}, kdims="sigma") 29 stairs_map.opts(framewise=True) NameError: name 'stairs_image' is not defined
unit:test-311:windows-latest: examples\user_guide\11-Transforming_Elements.ipynb#L1
examples\user_guide\11-Transforming_Elements.ipynb::Cell 22 Notebook cell execution failed Cell 22: Cell execution caused an exception Input: image_filter(stairs_map, type_="high-pass").opts(framewise=True) Traceback: --------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[1], line 1 ----> 1 image_filter(stairs_map, type_="high-pass").opts(framewise=True) NameError: name 'stairs_map' is not defined
unit:test-311:windows-latest: examples\gallery\demos\bokeh\histogram_example.ipynb#L1
examples\gallery\demos\bokeh\histogram_example.ipynb::Cell 1 Notebook cell execution failed Cell 1: Cell execution caused an exception Input: def get_overlay(hist, x, pdf, cdf, label): pdf = hv.Curve((x, pdf), label='PDF') cdf = hv.Curve((x, cdf), label='CDF') return (hv.Histogram(hist, vdims='P(r)') * pdf * cdf).relabel(label) np.seterr(divide='ignore', invalid='ignore') label = "Normal Distribution (μ=0, σ=0.5)" mu, sigma = 0, 0.5 measured = np.random.normal(mu, sigma, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(-2, 2, 1000) pdf = 1/(sigma * np.sqrt(2*np.pi)) * np.exp(-(x-mu)**2 / (2*sigma**2)) cdf = (1+scipy.special.erf((x-mu)/np.sqrt(2*sigma**2)))/2 norm = get_overlay(hist, x, pdf, cdf, label) label = "Log Normal Distribution (μ=0, σ=0.5)" mu, sigma = 0, 0.5 measured = np.random.lognormal(mu, sigma, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 8.0, 1000) pdf = 1/(x* sigma * np.sqrt(2*np.pi)) * np.exp(-(np.log(x)-mu)**2 / (2*sigma**2)) cdf = (1+scipy.special.erf((np.log(x)-mu)/(np.sqrt(2)*sigma)))/2 lognorm = get_overlay(hist, x, pdf, cdf, label) label = "Gamma Distribution (k=1, θ=2)" k, theta = 1.0, 2.0 measured = np.random.gamma(k, theta, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 20.0, 1000) pdf = x**(k-1) * np.exp(-x/theta) / (theta**k * scipy.special.gamma(k)) cdf = scipy.special.gammainc(k, x/theta) / scipy.special.gamma(k) gamma = get_overlay(hist, x, pdf, cdf, label) label = "Beta Distribution (α=2, β=2)" alpha, beta = 2.0, 2.0 measured = np.random.beta(alpha, beta, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 1, 1000) pdf = x**(alpha-1) * (1-x)**(beta-1) / scipy.special.beta(alpha, beta) cdf = scipy.special.btdtr(alpha, beta, x) beta = get_overlay(hist, x, pdf, cdf, label) label = "Weibull Distribution (λ=1, k=1.25)" lam, k = 1, 1.25 measured = lam*(-np.log(np.random.uniform(0, 1, 1000)))**(1/k) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 8, 1000) pdf = (k/lam)*(x/lam)**(k-1) * np.exp(-(x/lam)**k) cdf = 1 - np.exp(-(x/lam)**k) weibull = get_overlay(hist, x, pdf, cdf, label) Traceback: --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In[1], line 52 50 x = np.linspace(0, 1, 1000) 51 pdf = x**(alpha-1) * (1-x)**(beta-1) / scipy.special.beta(alpha, beta) ---> 52 cdf = scipy.special.btdtr(alpha, beta, x) 53 beta = get_overlay(hist, x, pdf, cdf, label) 56 label = "Weibull Distribution (λ=1, k=1.25)" AttributeError: module 'scipy.special' has no attribute 'btdtr'
unit:test-311:windows-latest: examples\gallery\demos\bokeh\histogram_example.ipynb#L1
examples\gallery\demos\bokeh\histogram_example.ipynb::Cell 2 Notebook cell execution failed Cell 2: Cell execution caused an exception Input: layout = (norm + lognorm + gamma + beta + weibull).cols(2) layout.opts( opts.Curve(axiswise=True), opts.Histogram(fill_color="#036564", axiswise=True, height=350, width=350, bgcolor="#E8DDCB"), opts.Layout(shared_axes=False)) Traceback: --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In[1], line 1 ----> 1 layout = (norm + lognorm + gamma + beta + weibull).cols(2) 2 layout.opts( 3 opts.Curve(axiswise=True), 4 opts.Histogram(fill_color="#036564", axiswise=True, height=350, width=350, bgcolor="#E8DDCB"), 5 opts.Layout(shared_axes=False)) File D:\a\holoviews\holoviews\holoviews\core\layout.py:30, in Layoutable.__add__(x, y) 24 raise TypeError(f"unsupported operand type(s) for +: {x.__class__.__name__} and {y.__class__.__name__}. " 25 "If you are trying to use a reduction like `sum(elements)` " 26 "to combine a list of elements, we recommend you use " 27 "`Layout(elements)` (and similarly `Overlay(elements)` for " 28 "making an overlay from a list) instead.") 29 try: ---> 30 return Layout([x, y]) 31 except NotImplementedError: 32 return NotImplemented File D:\a\holoviews\holoviews\holoviews\core\layout.py:442, in Layout.__init__(self, items, identifier, parent, **kwargs) 440 def __init__(self, items=None, identifier=None, parent=None, **kwargs): 441 self.__dict__['_max_cols'] = 4 --> 442 super().__init__(items, identifier, parent, **kwargs) File D:\a\holoviews\holoviews\holoviews\core\dimensio
unit:test-311:windows-latest: examples\gallery\demos\matplotlib\histogram_example.ipynb#L1
examples\gallery\demos\matplotlib\histogram_example.ipynb::Cell 1 Notebook cell execution failed Cell 1: Cell execution caused an exception Input: def get_overlay(hist, x, pdf, cdf, label): pdf = hv.Curve((x, pdf), label='PDF') cdf = hv.Curve((x, cdf), label='CDF') return (hv.Histogram(hist, vdims='P(r)') * pdf * cdf).relabel(label) label = "Normal Distribution (μ=0, σ=0.5)" mu, sigma = 0, 0.5 measured = np.random.normal(mu, sigma, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(-2, 2, 1000) pdf = 1/(sigma * np.sqrt(2*np.pi)) * np.exp(-(x-mu)**2 / (2*sigma**2)) cdf = (1+scipy.special.erf((x-mu)/np.sqrt(2*sigma**2)))/2 norm = get_overlay(hist, x, pdf, cdf, label) np.seterr(divide='ignore', invalid='ignore') label = "Log Normal Distribution (μ=0, σ=0.5)" mu, sigma = 0, 0.5 measured = np.random.lognormal(mu, sigma, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 8.0, 1000) pdf = 1/(x* sigma * np.sqrt(2*np.pi)) * np.exp(-(np.log(x)-mu)**2 / (2*sigma**2)) cdf = (1+scipy.special.erf((np.log(x)-mu)/(np.sqrt(2)*sigma)))/2 lognorm = get_overlay(hist, x, pdf, cdf, label) label = "Gamma Distribution (k=1, θ=2)" k, theta = 1.0, 2.0 measured = np.random.gamma(k, theta, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 20.0, 1000) pdf = x**(k-1) * np.exp(-x/theta) / (theta**k * scipy.special.gamma(k)) cdf = scipy.special.gammainc(k, x/theta) / scipy.special.gamma(k) gamma = get_overlay(hist, x, pdf, cdf, label) label = "Beta Distribution (α=2, β=2)" alpha, beta = 2.0, 2.0 measured = np.random.beta(alpha, beta, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 1, 1000) pdf = x**(alpha-1) * (1-x)**(beta-1) / scipy.special.beta(alpha, beta) cdf = scipy.special.btdtr(alpha, beta, x) beta = get_overlay(hist, x, pdf, cdf, label) label = "Weibull Distribution (λ=1, k=1.25)" lam, k = 1, 1.25 measured = lam*(-np.log(np.random.uniform(0, 1, 1000)))**(1/k) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 8, 1000) pdf = (k/lam)*(x/lam)**(k-1) * np.exp(-(x/lam)**k) cdf = 1 - np.exp(-(x/lam)**k) weibull = get_overlay(hist, x, pdf, cdf, label) Traceback: --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In[1], line 52 50 x = np.linspace(0, 1, 1000) 51 pdf = x**(alpha-1) * (1-x)**(beta-1) / scipy.special.beta(alpha, beta) ---> 52 cdf = scipy.special.btdtr(alpha, beta, x) 53 beta = get_overlay(hist, x, pdf, cdf, label) 56 label = "Weibull Distribution (λ=1, k=1.25)" AttributeError: module 'scipy.special' has no attribute 'btdtr'
unit:test-311:windows-latest: examples\gallery\demos\matplotlib\histogram_example.ipynb#L1
examples\gallery\demos\matplotlib\histogram_example.ipynb::Cell 2 Notebook cell execution failed Cell 2: Cell execution caused an exception Input: (norm + lognorm + gamma + beta + weibull).opts( opts.Curve(axiswise=True), opts.Histogram(facecolor="#036564", axiswise=True, bgcolor="#E8DDCB"), opts.Layout(hspace=0.2)).cols(2) Traceback: --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In[1], line 1 ----> 1 (norm + lognorm + gamma + beta + weibull).opts( 2 opts.Curve(axiswise=True), 3 opts.Histogram(facecolor="#036564", axiswise=True, bgcolor="#E8DDCB"), 4 opts.Layout(hspace=0.2)).cols(2) File D:\a\holoviews\holoviews\holoviews\core\layout.py:30, in Layoutable.__add__(x, y) 24 raise TypeError(f"unsupported operand type(s) for +: {x.__class__.__name__} and {y.__class__.__name__}. " 25 "If you are trying to use a reduction like `sum(elements)` " 26 "to combine a list of elements, we recommend you use " 27 "`Layout(elements)` (and similarly `Overlay(elements)` for " 28 "making an overlay from a list) instead.") 29 try: ---> 30 return Layout([x, y]) 31 except NotImplementedError: 32 return NotImplemented File D:\a\holoviews\holoviews\holoviews\core\layout.py:442, in Layout.__init__(self, items, identifier, parent, **kwargs) 440 def __init__(self, items=None, identifier=None, parent=None, **kwargs): 441 self.__dict__['_max_cols'] = 4 --> 442 super().__init__(items, identifier, parent, **kwargs) File D:\a\holoviews\holoviews\holoviews\core\dimension.py:1313, in ViewableTree.__init__(self, items, identifier, parent, **kwargs) 1310 items = self._proces
unit:test-311:windows-latest
Process completed with exit code 1.
unit:test-310:windows-latest: examples\user_guide\11-Transforming_Elements.ipynb#L1
examples\user_guide\11-Transforming_Elements.ipynb::Cell 20 Notebook cell execution failed Cell 20: Cell execution caused an exception Input: hv.output(backend='matplotlib', size=200) from scipy.misc import ascent stairs_image = hv.Image(ascent()[200:500, :], bounds=[0, 0, ascent().shape[1], 300], label="stairs") stairs_image Traceback: --------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[1], line 3 1 hv.output(backend='matplotlib', size=200) ----> 3 from scipy.misc import ascent 5 stairs_image = hv.Image(ascent()[200:500, :], bounds=[0, 0, ascent().shape[1], 300], label="stairs") 6 stairs_image ImportError: cannot import name 'ascent' from 'scipy.misc' (D:\a\holoviews\holoviews\.pixi\envs\test-310\lib\site-packages\scipy\misc\__init__.py)
unit:test-310:windows-latest: examples\user_guide\11-Transforming_Elements.ipynb#L1
examples\user_guide\11-Transforming_Elements.ipynb::Cell 21 Notebook cell execution failed Cell 21: Cell execution caused an exception Input: from scipy import ndimage class image_filter(hv.Operation): sigma = param.Number(default=5) type_ = param.String(default="low-pass") def _process(self, element, key=None): xs = element.dimension_values(0, expanded=False) ys = element.dimension_values(1, expanded=False) # setting flat=False will preserve the matrix shape data = element.dimension_values(2, flat=False) if self.p.type_ == "high-pass": new_data = data - ndimage.gaussian_filter(data, self.p.sigma) else: new_data = ndimage.gaussian_filter(data, self.p.sigma) label = element.label + " ({} filtered)".format(self.p.type_) # make an exact copy of the element with all settings, just with different data and label: element = element.clone((xs, ys, new_data), label=label) return element stairs_map = hv.HoloMap({sigma: image_filter(stairs_image, sigma=sigma) for sigma in range(0, 12, 1)}, kdims="sigma") stairs_map.opts(framewise=True) Traceback: --------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[1], line 26 23 element = element.clone((xs, ys, new_data), label=label) 24 return element ---> 26 stairs_map = hv.HoloMap({sigma: image_filter(stairs_image, sigma=sigma) 27 for sigma in range(0, 12, 1)}, kdims="sigma") 29 stairs_map.opts(framewise=True) Cell In[1], line 26, in <dictcomp>(.0) 23 element = element.clone((xs, ys, new_data), label=label) 24 return element ---> 26 stairs_map = hv.HoloMap({sigma: image_filter(stairs_image, sigma=sigma) 27 for sigma in range(0, 12, 1)}, kdims="sigma") 29 stairs_map.opts(framewise=True) NameError: name 'stairs_image' is not defined
unit:test-310:windows-latest: examples\user_guide\11-Transforming_Elements.ipynb#L1
examples\user_guide\11-Transforming_Elements.ipynb::Cell 22 Notebook cell execution failed Cell 22: Cell execution caused an exception Input: image_filter(stairs_map, type_="high-pass").opts(framewise=True) Traceback: --------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[1], line 1 ----> 1 image_filter(stairs_map, type_="high-pass").opts(framewise=True) NameError: name 'stairs_map' is not defined
unit:test-310:windows-latest: examples\gallery\demos\bokeh\histogram_example.ipynb#L1
examples\gallery\demos\bokeh\histogram_example.ipynb::Cell 1 Notebook cell execution failed Cell 1: Cell execution caused an exception Input: def get_overlay(hist, x, pdf, cdf, label): pdf = hv.Curve((x, pdf), label='PDF') cdf = hv.Curve((x, cdf), label='CDF') return (hv.Histogram(hist, vdims='P(r)') * pdf * cdf).relabel(label) np.seterr(divide='ignore', invalid='ignore') label = "Normal Distribution (μ=0, σ=0.5)" mu, sigma = 0, 0.5 measured = np.random.normal(mu, sigma, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(-2, 2, 1000) pdf = 1/(sigma * np.sqrt(2*np.pi)) * np.exp(-(x-mu)**2 / (2*sigma**2)) cdf = (1+scipy.special.erf((x-mu)/np.sqrt(2*sigma**2)))/2 norm = get_overlay(hist, x, pdf, cdf, label) label = "Log Normal Distribution (μ=0, σ=0.5)" mu, sigma = 0, 0.5 measured = np.random.lognormal(mu, sigma, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 8.0, 1000) pdf = 1/(x* sigma * np.sqrt(2*np.pi)) * np.exp(-(np.log(x)-mu)**2 / (2*sigma**2)) cdf = (1+scipy.special.erf((np.log(x)-mu)/(np.sqrt(2)*sigma)))/2 lognorm = get_overlay(hist, x, pdf, cdf, label) label = "Gamma Distribution (k=1, θ=2)" k, theta = 1.0, 2.0 measured = np.random.gamma(k, theta, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 20.0, 1000) pdf = x**(k-1) * np.exp(-x/theta) / (theta**k * scipy.special.gamma(k)) cdf = scipy.special.gammainc(k, x/theta) / scipy.special.gamma(k) gamma = get_overlay(hist, x, pdf, cdf, label) label = "Beta Distribution (α=2, β=2)" alpha, beta = 2.0, 2.0 measured = np.random.beta(alpha, beta, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 1, 1000) pdf = x**(alpha-1) * (1-x)**(beta-1) / scipy.special.beta(alpha, beta) cdf = scipy.special.btdtr(alpha, beta, x) beta = get_overlay(hist, x, pdf, cdf, label) label = "Weibull Distribution (λ=1, k=1.25)" lam, k = 1, 1.25 measured = lam*(-np.log(np.random.uniform(0, 1, 1000)))**(1/k) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 8, 1000) pdf = (k/lam)*(x/lam)**(k-1) * np.exp(-(x/lam)**k) cdf = 1 - np.exp(-(x/lam)**k) weibull = get_overlay(hist, x, pdf, cdf, label) Traceback: --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In[1], line 52 50 x = np.linspace(0, 1, 1000) 51 pdf = x**(alpha-1) * (1-x)**(beta-1) / scipy.special.beta(alpha, beta) ---> 52 cdf = scipy.special.btdtr(alpha, beta, x) 53 beta = get_overlay(hist, x, pdf, cdf, label) 56 label = "Weibull Distribution (λ=1, k=1.25)" AttributeError: module 'scipy.special' has no attribute 'btdtr'
unit:test-310:windows-latest: examples\gallery\demos\bokeh\histogram_example.ipynb#L1
examples\gallery\demos\bokeh\histogram_example.ipynb::Cell 2 Notebook cell execution failed Cell 2: Cell execution caused an exception Input: layout = (norm + lognorm + gamma + beta + weibull).cols(2) layout.opts( opts.Curve(axiswise=True), opts.Histogram(fill_color="#036564", axiswise=True, height=350, width=350, bgcolor="#E8DDCB"), opts.Layout(shared_axes=False)) Traceback: --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In[1], line 1 ----> 1 layout = (norm + lognorm + gamma + beta + weibull).cols(2) 2 layout.opts( 3 opts.Curve(axiswise=True), 4 opts.Histogram(fill_color="#036564", axiswise=True, height=350, width=350, bgcolor="#E8DDCB"), 5 opts.Layout(shared_axes=False)) File D:\a\holoviews\holoviews\holoviews\core\layout.py:30, in Layoutable.__add__(x, y) 24 raise TypeError(f"unsupported operand type(s) for +: {x.__class__.__name__} and {y.__class__.__name__}. " 25 "If you are trying to use a reduction like `sum(elements)` " 26 "to combine a list of elements, we recommend you use " 27 "`Layout(elements)` (and similarly `Overlay(elements)` for " 28 "making an overlay from a list) instead.") 29 try: ---> 30 return Layout([x, y]) 31 except NotImplementedError: 32 return NotImplemented File D:\a\holoviews\holoviews\holoviews\core\layout.py:442, in Layout.__init__(self, items, identifier, parent, **kwargs) 440 def __init__(self, items=None, identifier=None, parent=None, **kwargs): 441 self.__dict__['_max_cols'] = 4 --> 442 super().__init__(items, identifier, parent, **kwargs) File D:\a\holoviews\holoviews\holoviews\core\dimension.py:1313, in ViewableTree.__init__(self, items, identifier, parent, **kwargs) 1310 items = self�[3
unit:test-310:windows-latest: examples\gallery\demos\matplotlib\histogram_example.ipynb#L1
examples\gallery\demos\matplotlib\histogram_example.ipynb::Cell 1 Notebook cell execution failed Cell 1: Cell execution caused an exception Input: def get_overlay(hist, x, pdf, cdf, label): pdf = hv.Curve((x, pdf), label='PDF') cdf = hv.Curve((x, cdf), label='CDF') return (hv.Histogram(hist, vdims='P(r)') * pdf * cdf).relabel(label) label = "Normal Distribution (μ=0, σ=0.5)" mu, sigma = 0, 0.5 measured = np.random.normal(mu, sigma, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(-2, 2, 1000) pdf = 1/(sigma * np.sqrt(2*np.pi)) * np.exp(-(x-mu)**2 / (2*sigma**2)) cdf = (1+scipy.special.erf((x-mu)/np.sqrt(2*sigma**2)))/2 norm = get_overlay(hist, x, pdf, cdf, label) np.seterr(divide='ignore', invalid='ignore') label = "Log Normal Distribution (μ=0, σ=0.5)" mu, sigma = 0, 0.5 measured = np.random.lognormal(mu, sigma, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 8.0, 1000) pdf = 1/(x* sigma * np.sqrt(2*np.pi)) * np.exp(-(np.log(x)-mu)**2 / (2*sigma**2)) cdf = (1+scipy.special.erf((np.log(x)-mu)/(np.sqrt(2)*sigma)))/2 lognorm = get_overlay(hist, x, pdf, cdf, label) label = "Gamma Distribution (k=1, θ=2)" k, theta = 1.0, 2.0 measured = np.random.gamma(k, theta, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 20.0, 1000) pdf = x**(k-1) * np.exp(-x/theta) / (theta**k * scipy.special.gamma(k)) cdf = scipy.special.gammainc(k, x/theta) / scipy.special.gamma(k) gamma = get_overlay(hist, x, pdf, cdf, label) label = "Beta Distribution (α=2, β=2)" alpha, beta = 2.0, 2.0 measured = np.random.beta(alpha, beta, 1000) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 1, 1000) pdf = x**(alpha-1) * (1-x)**(beta-1) / scipy.special.beta(alpha, beta) cdf = scipy.special.btdtr(alpha, beta, x) beta = get_overlay(hist, x, pdf, cdf, label) label = "Weibull Distribution (λ=1, k=1.25)" lam, k = 1, 1.25 measured = lam*(-np.log(np.random.uniform(0, 1, 1000)))**(1/k) hist = np.histogram(measured, density=True, bins=50) x = np.linspace(0, 8, 1000) pdf = (k/lam)*(x/lam)**(k-1) * np.exp(-(x/lam)**k) cdf = 1 - np.exp(-(x/lam)**k) weibull = get_overlay(hist, x, pdf, cdf, label) Traceback: --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In[1], line 52 50 x = np.linspace(0, 1, 1000) 51 pdf = x**(alpha-1) * (1-x)**(beta-1) / scipy.special.beta(alpha, beta) ---> 52 cdf = scipy.special.btdtr(alpha, beta, x) 53 beta = get_overlay(hist, x, pdf, cdf, label) 56 label = "Weibull Distribution (λ=1, k=1.25)" AttributeError: module 'scipy.special' has no attribute 'btdtr'
unit:test-310:windows-latest: examples\gallery\demos\matplotlib\histogram_example.ipynb#L1
examples\gallery\demos\matplotlib\histogram_example.ipynb::Cell 2 Notebook cell execution failed Cell 2: Cell execution caused an exception Input: (norm + lognorm + gamma + beta + weibull).opts( opts.Curve(axiswise=True), opts.Histogram(facecolor="#036564", axiswise=True, bgcolor="#E8DDCB"), opts.Layout(hspace=0.2)).cols(2) Traceback: --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In[1], line 1 ----> 1 (norm + lognorm + gamma + beta + weibull).opts( 2 opts.Curve(axiswise=True), 3 opts.Histogram(facecolor="#036564", axiswise=True, bgcolor="#E8DDCB"), 4 opts.Layout(hspace=0.2)).cols(2) File D:\a\holoviews\holoviews\holoviews\core\layout.py:30, in Layoutable.__add__(x, y) 24 raise TypeError(f"unsupported operand type(s) for +: {x.__class__.__name__} and {y.__class__.__name__}. " 25 "If you are trying to use a reduction like `sum(elements)` " 26 "to combine a list of elements, we recommend you use " 27 "`Layout(elements)` (and similarly `Overlay(elements)` for " 28 "making an overlay from a list) instead.") 29 try: ---> 30 return Layout([x, y]) 31 except NotImplementedError: 32 return NotImplemented File D:\a\holoviews\holoviews\holoviews\core\layout.py:442, in Layout.__init__(self, items, identifier, parent, **kwargs) 440 def __init__(self, items=None, identifier=None, parent=None, **kwargs): 441 self.__dict__['_max_cols'] = 4 --> 442 super().__init__(items, identifier, parent, **kwargs) File D:\a\holoviews\holoviews\holoviews\core\dimension.py:1313, in ViewableTree.__init__(self, items, identifier, parent, **kwargs) 1310 items = self._process_items(items) 1311 params = {p: kwargs.pop(p) for p in [*�[38;5;
unit:test-310:windows-latest
Process completed with exit code 1.
result:test
Process completed with exit code 1.
Setup workflow
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Setup workflow
'before' field is missing in event payload - changes will be detected from last commit
Pixi lock
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Run pre-commit
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
core:test-core:ubuntu-latest
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
ui:test-ui:ubuntu-latest
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
unit:test-312:ubuntu-latest
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
unit:test-39:ubuntu-latest
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
unit:test-311:ubuntu-latest
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
unit:test-310:ubuntu-latest
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
result:test
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636

Artifacts

Produced during runtime
Name Size
pixi-lock
306 KB