NVIDIA / warp

A Python framework for high performance GPU simulation and graphics
https://nvidia.github.io/warp/
Other
4.27k stars 243 forks source link

[BUG] wp.array Fails to Convert dtype to wp.vec3 without warning #341

Open mehdiataei opened 2 weeks ago

mehdiataei commented 2 weeks ago

Bug Description

Hello!

import warp as wp
x = wp.zeros((100, 3), dtype=wp.float32)
print(x.dtype)  # Expected: <class 'warp.types.float32'>

x = wp.array(x, dtype=wp.vec3)
print(x.dtype)  # Expected: <class 'warp.types.vec3'>, but you get: <class 'warp.types.float32'>

It may not be a bug inherently, but an error could be raised if the conversion is not possible.

System Information

No response

nvlukasz commented 2 weeks ago

Thanks Mehdi, this seems like a limitation we should address.