Skip to content

Conversation

@jkwak-work
Copy link
Contributor

is_nested_array() was only checked for ScalarType and MatrixType and it was missing VectorType checking. The change from this PR effectively treats VectorType as a valid tensor type as it is for ScalarType and MatrixType.

After discussions, the function is renamed to castable_to_scalar in order to reflect what it does better.

@jkwak-work
Copy link
Contributor Author

Fixes #638

@jkwak-work jkwak-work force-pushed the fix/array-of-vector-torch branch 2 times, most recently from 523648c to 3ff374f Compare January 15, 2026 22:40
@jkwak-work jkwak-work marked this pull request as draft January 15, 2026 22:47
@jkwak-work jkwak-work force-pushed the fix/array-of-vector-torch branch from 3ff374f to e0d6c19 Compare January 15, 2026 23:43
`is_nested_array()` was only checked for `ScalarType` and `MatrixType` and
it was missing `VectorType` checking. The change from this PR effectively
treats `VectorType` as a valid tensor type as it is for `ScalarType` and
`MatrixType`.

After discussions, the function is renamed to `castable_to_scalar` in
order to reflect what it does better.
@jkwak-work jkwak-work force-pushed the fix/array-of-vector-torch branch from e0d6c19 to a274c6b Compare January 16, 2026 00:02
@jkwak-work jkwak-work marked this pull request as ready for review January 16, 2026 01:45
@ccummingsNV
Copy link
Contributor

This looks fairly sane, but will have to wait until after the tensor refactor is merged in, as it changes quite a bit of stuff

@jkwak-work
Copy link
Contributor Author

jkwak-work commented Jan 16, 2026

I am going to turn this PR to a draft because:

  • I need to debug more to understand how and why the PR works
  • I need to add more tests with generic type/value parameters
  • I also need to wait until Chris merge his refactoring PR

@jkwak-work jkwak-work marked this pull request as draft January 16, 2026 21:28
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

Successfully merging this pull request may close these issues.

2 participants