From 56ae5de1ad67a1c3eb9ab8c9ba954516c8611718 Mon Sep 17 00:00:00 2001 From: Joost Ellerbroek Date: Mon, 2 Sep 2024 15:31:53 +0200 Subject: [PATCH] NumPy 2.0 --- bluesky/ui/qtgl/glnavdata.py | 6 +++--- bluesky/ui/qtgl/gltraffic.py | 2 +- requirements-gui.txt | 10 +++++----- requirements.txt | 8 ++++---- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/bluesky/ui/qtgl/glnavdata.py b/bluesky/ui/qtgl/glnavdata.py index ecd2c18a73..f0fb4eabff 100644 --- a/bluesky/ui/qtgl/glnavdata.py +++ b/bluesky/ui/qtgl/glnavdata.py @@ -85,7 +85,7 @@ def actdata_changed(self, nodeid, nodedata, changed_elems): self.customwp.update(lat=nodedata.custwplat, lon=nodedata.custwplon) self.custwplblbuf.update( - np.array(nodedata.custwplbl, dtype=np.string_)) + np.array(nodedata.custwplbl, dtype=np.bytes_)) self.ncustwpts = len(nodedata.custwplat) def create(self): @@ -120,7 +120,7 @@ def create(self): if len(wptid) <= 3: self.nnavaids += 1 wptids += wptid[:5].ljust(5) - npwpids = np.array(wptids, dtype=np.string_) + npwpids = np.array(wptids, dtype=np.bytes_) self.wptlabels.create(npwpids, self.waypoints.lat, self.waypoints.lon, palette.wptlabel, (wpt_size, 0.5 * wpt_size), instanced=True) @@ -155,7 +155,7 @@ def create(self): aptids = '' for aptid in apnames: aptids += aptid.ljust(4) - self.aptlabels.create(np.array(aptids, dtype=np.string_), + self.aptlabels.create(np.array(aptids, dtype=np.bytes_), self.airports.lat, self.airports.lon, palette.aptlabel, (apt_size, 0.5 * apt_size), instanced=True) diff --git a/bluesky/ui/qtgl/gltraffic.py b/bluesky/ui/qtgl/gltraffic.py index a96b0a1699..1716d29441 100644 --- a/bluesky/ui/qtgl/gltraffic.py +++ b/bluesky/ui/qtgl/gltraffic.py @@ -341,7 +341,7 @@ def update_aircraft_data(self, data): self.cpalines.update(vertex=cpalines) self.color.update(color) - self.lbl.update(np.array(rawlabel.encode('utf8'), dtype=np.string_)) + self.lbl.update(np.array(rawlabel.encode('utf8'), dtype=np.bytes_)) # If there is a visible route, update the start position if self.route_acid in data.id: diff --git a/requirements-gui.txt b/requirements-gui.txt index 2853e2f7e1..60a088138f 100644 --- a/requirements-gui.txt +++ b/requirements-gui.txt @@ -2,11 +2,11 @@ PyQt6 PyQt6-WebEngine pygame pyopengl -numpy -scipy -pandas -matplotlib -msgpack +numpy >= 2.0.0 +scipy >= 1.13.0 +matplotlib >= 3.9.0 +pandas >= 2.2.0 +msgpack >= 1.0.0 zmq textual bluesky-simdata diff --git a/requirements.txt b/requirements.txt index 651a82c903..1724b36e8b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ -numpy -scipy -matplotlib +numpy >= 2.0.0 +scipy >= 1.13.0 +matplotlib >= 3.9.0 msgpack >= 1.0.0 zmq -pandas +pandas >= 2.2.0 bluesky-simdata \ No newline at end of file