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
{{ message }}
Repository navigation
[Bug]: art3d.py set_data_3d; "RuntimeError- must be a sequence" #25544
Breaks single point drawing. set_data_3d() changed to:
def set_data_3d(self, *args):
if len(args) == 1:
args = args[0]
for name, xyz in zip('xyz', args):
if not np.iterable(xyz):
raise RuntimeError(f'{name} must be a sequence')
self._verts3d = args
self.stale = True
This was an intentional change introduced in #22329
The short version is that it was never truly intended behavior that worked by accident.
Setting to scalars was explicitly not allowed at init time, but no such check was done for the update versions of the calls.
A more full discussion can be seen at the above PR, which has a pretty well considered opinions on why this change was made. It is unlikely to change back without a particularly compelling reason.
Recommendation is to do:
set_data_3d([0.94], [-0.26], [0.22])
instead, which is compatible with both older and newer versions of mpl.
Activity
ksunden commentedon Mar 25, 2023
This was an intentional change introduced in #22329
The short version is that it was never truly intended behavior that worked by accident.
Setting to scalars was explicitly not allowed at init time, but no such check was done for the update versions of the calls.
A more full discussion can be seen at the above PR, which has a pretty well considered opinions on why this change was made. It is unlikely to change back without a particularly compelling reason.
Recommendation is to do:
instead, which is compatible with both older and newer versions of mpl.