-
Notifications
You must be signed in to change notification settings - Fork 25
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
feat: SparseArray uses ScalarValue instead of Scalar #955
feat: SparseArray uses ScalarValue instead of Scalar #955
Conversation
14215be
to
bc67a80
Compare
Some(idx) => scalar_at_unchecked(&self.values(), idx).cast(self.dtype()), | ||
} | ||
Ok(match self.search_index(index)?.to_found() { | ||
None => self.fill_owned_scalar(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think fill_scalar is a better name for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
) -> VortexResult<Self> { | ||
if !matches!(indices.dtype(), &DType::IDX) { | ||
vortex_bail!("Cannot use {} as indices", indices.dtype()); | ||
} | ||
if values.dtype() != fill_value.dtype() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be nice to keep a check like this but would have to add method to dtype to check if it is a valid scalar value for the type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No description provided.