Skip to content

Hough indexing and lazy loading of patterns: Cannot determine Numba type of <class 'dask.array.core.Array'> #596

Answered by hakonanes
Erlendos12 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Erlendos12!

Passing Dask arrays to PyEBSDIndex only works if the GPU is used, i.e. if PyOpenCL is installed. The Numba kernels assume NumPy arrays, hence the error you get.

I've added a very light, experimental wrapper around PyEBSDIndex in EBSD.hough_indexing() in version 0.8. This method throws an error immediately if patterns are lazily loaded but PyOpenCL is not installed:

if not _pyebsdindex_installed: # pragma: no cover
raise ValueError(
"Hough indexing requires pyebsdindex to be installed. Install it with "
"pip install pyebsdindex. See "
"https://kikuchipy.org/en/stable/user/insta…

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@Erlendos12
Comment options

@hakonanes
Comment options

@Erlendos12
Comment options

@hakonanes
Comment options

@Erlendos12
Comment options

Answer selected by Erlendos12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants