Skip to content

datatype typo: float_ not defined  #2331

@kurisutsukato

Description

@kurisutsukato

any OS
wxPython 4.2 from pypi
stock python 3.10

Description of the problem:

An unknown datatype appears in the source: float_ instead of float. This happened when changing the datatypes from N.<dtype> to <dtype> because of the deprecation of numpy datatypes float and int. Changing it to float fixes the problem.

The FloatCanvas demo runs nevertheless but behaves rarely.

Traceback below (click to expand)
Traceback (most recent call last):
  File "C:\Users\user\Downloads\wxPython-demo-4.2.0\demo\FloatCanvas.py", line 1866, in OnInit
    frame.DrawTest()
  File "C:\Users\user\Downloads\wxPython-demo-4.2.0\demo\FloatCanvas.py", line 421, in DrawTest
    Canvas.ZoomToBB()
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\wx\lib\floatcanvas\FloatCanvas.py", line 782, in ZoomToBB
    (BoundingBox[0,1]+BoundingBox[1,1])/2 ),float_)
NameError: name 'float_' is not defined. Did you mean: 'float'?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions