You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FAILED tests/test_str.py::test_to_categorical - NotImplementedError: merging categorical arrays is currently not implemented. Use `ak.enforce_type` to drop the categorical type and use general merging.
When .compute() is called on a categorical array collection there is a call to ak.concatenate which happens in dask_awkward.lib.core._finalize_array, we need to add a check so that we can call enforce_type when necessary
The text was updated successfully, but these errors were encountered:
When merging categoricals, we want to preserve the uniqueness of the categorical content. If all contents are identical, and therefore only the indices vary, we could define a trivial merge rule. If this is not the case, then we'd need to re-categorise the result.
Right now, Awkward does neither; 2.5.0 just ensures that we properly complain to the user. Users can drop the categorical-ness at the point of computation to ensure that we drop the categorical-ness, and then re-categorize with ak.str.to_categoricalafter computation.
@jpivarski and I discussed adding a built-in operation to support categorical merging on strings, which is the most likely use-case, over in scikit-hep/awkward#2853. For now, the error is probably OK in my view, but I defer to other people's judgement!
Test failure:
When
.compute()
is called on a categorical array collection there is a call toak.concatenate
which happens indask_awkward.lib.core._finalize_array
, we need to add a check so that we can callenforce_type
when necessaryThe text was updated successfully, but these errors were encountered: