Open mkofler96 opened 1 month ago
I will look into this.
Did anything else downgrade as well? Or just numpy? Could you provide the package list with versions for the downgraded environment?
I have looked into it a bit. This seems to be a problem with how vedo converts points and lines to k3d. If I change in vedo.backends
the corresponding lines to not include conversion to numpy floats or explicitly convert them back it seems to work again.
Specifically the lines 316 onward to:
aves = float(ia.average_size() * iap.GetPointSize() / 200)
kobj = k3d.points(
ia.vertices.astype(float),
color=_rgb2int(iap.GetColor()),
colors=kcols,
opacity=iap.GetOpacity(),
shader=settings.k3d_point_shader,
point_size=aves,
name=name,
)
and lines from 243 onward
aves = float(ia.diagonal_size() * iap.GetLineWidth() / 100)
kobj = k3d.line(
pts.astype(float),
color=_rgb2int(iap.GetColor()),
opacity=iap.GetOpacity(),
shader=settings.k3d_line_shader,
width=aves,
name=name,
)
it works again for me. I am not sure why this is just changing its functionality now and not before. Why traitlets
was ok with this before and now it is not I am not sure.
I opened an issue for this on vedo for this https://github.com/marcomusy/vedo/issues/1197#issue-2635555643.
Vedo has pushed the fix I have suggested. I will not make a determination on what vedo version has to be used yet since they have not had a new release. But if you have this issue it should be fixed if you install vedo from source.
When running the example notebook on a fresh installation, I get a trait error
TraitError: The 'width' trait of a Line instance expected a float or a dict, not the float32 np.float32(0.054083023)."
Downgrading numpy to version 1.26.4 solved the issue for me.
Relevant conda environment specs: