Created
May 4, 2020 11:03
-
-
Save herberteuler/80d444fc794e953bc50983d2cfb447c5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import dask.array as da | |
import numpy as np | |
arr = da.from_array(np.arange(9).reshape(3,3)) | |
a = da.min(arr) | |
b = da.max(arr) | |
quantiles = da.linspace(a, b, 4) | |
print(np.array(quantiles)) | |
# Traceback (most recent call last): | |
# File "tests/1.py", line 8, in <module> | |
# print(np.array(quantiles)) | |
# File "/home/zhujun/local_training/venv/lib/python3.6/site-packages/dask/array/core.py", line 1341, in __array__ | |
# x = np.array(x) | |
# File "/home/zhujun/local_training/venv/lib/python3.6/site-packages/dask/array/core.py", line 1341, in __array__ | |
# x = np.array(x) | |
# File "/home/zhujun/local_training/venv/lib/python3.6/site-packages/dask/array/core.py", line 1341, in __array__ | |
# x = np.array(x) | |
# [Previous line repeated 322 more times] | |
# File "/home/zhujun/local_training/venv/lib/python3.6/site-packages/dask/array/core.py", line 1337, in __array__ | |
# x = self.compute() | |
# File "/home/zhujun/local_training/venv/lib/python3.6/site-packages/dask/base.py", line 166, in compute | |
# (result,) = compute(self, traverse=False, **kwargs) | |
# File "/home/zhujun/local_training/venv/lib/python3.6/site-packages/dask/base.py", line 437, in compute | |
# results = schedule(dsk, keys, **kwargs) | |
# File "/home/zhujun/local_training/venv/lib/python3.6/site-packages/dask/threaded.py", line 84, in get | |
# **kwargs | |
# File "/home/zhujun/local_training/venv/lib/python3.6/site-packages/dask/local.py", line 471, in get_async | |
# fire_task() | |
# File "/home/zhujun/local_training/venv/lib/python3.6/site-packages/dask/local.py", line 466, in fire_task | |
# callback=queue.put, | |
# File "/usr/lib64/python3.6/multiprocessing/pool.py", line 356, in apply_async | |
# result = ApplyResult(self._cache, callback, error_callback) | |
# File "/usr/lib64/python3.6/multiprocessing/pool.py", line 620, in __init__ | |
# self._event = threading.Event() | |
# File "/usr/lib64/python3.6/threading.py", line 499, in __init__ | |
# self._cond = Condition(Lock()) | |
# File "/usr/lib64/python3.6/threading.py", line 226, in __init__ | |
# self._release_save = lock._release_save | |
# RecursionError: maximum recursion depth exceeded while calling a Python object |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment