Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug in _update_hist_domain_for_dtype #119

Open
tlambert03 opened this issue Jan 23, 2025 · 0 comments
Open

bug in _update_hist_domain_for_dtype #119

tlambert03 opened this issue Jan 23, 2025 · 0 comments

Comments

@tlambert03
Copy link
Member

heres the stack trace... haven't investigated when it can happen yet:

│ /Users/talley/dev/self/ndv/src/ndv/controllers/_array_viewer.py:203 in _add_histogram            │
│                                                                                                  │
│   200 │   │   │   │   self._histogram.set_data(counts, edges)                                    │
│   201 │   │                                                                                      │
│   202 │   │   if self.data is not None:                                                          │
│ ❱ 203 │   │   │   self._update_hist_domain_for_dtype()                                           │
│   204 │                                                                                          │
│   205 │   def _update_hist_domain_for_dtype(                                                     │
│   206 │   │   self, dtype: np.typing.DTypeLike | None = None                                     │
│                                                                                                  │
│ /Users/talley/dev/self/ndv/src/ndv/controllers/_array_viewer.py:213 in                           │
│ _update_hist_domain_for_dtype                                                                    │
│                                                                                                  │
│   210 │   │   if dtype is None:                                                                  │
│   211 │   │   │   if (wrapper := self._data_model.data_wrapper) is None:                         │
│   212 │   │   │   │   return                                                                     │
│ ❱ 213 │   │   │   dtype = wrapper.dtype                                                          │
│   214 │   │   else:                                                                              │
│   215 │   │   │   dtype = np.dtype(dtype)                                                        │
│   216 │   │   if dtype.kind in "iu":                                                             │
│                                                                                                  │
│ /Users/talley/dev/self/ndv/src/ndv/models/_data_wrapper.py:118 in dtype                          │
│                                                                                                  │
│   115 │   def dtype(self) -> np.dtype:                                                           │
│   116 │   │   """Return the dtype for the data."""                                               │
│   117 │   │   try:                                                                               │
│ ❱ 118 │   │   │   return np.dtype(self._data.dtype)  # type: ignore                              │
│   119 │   │   except AttributeError as e:                                                        │
│   120 │   │   │   raise NotImplementedError(                                                     │
│   121 │   │   │   │   "`dtype` property not properly implemented for DataWrapper of type: "      │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
TypeError: Cannot interpret 'dtype("uint16")' as a data type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant