Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ REQUIRED

* python (v. 3.7 or higher)
* setuptools-scm
* numpy (v. 1.13 or higher)
* numpy (v. 1.14 or higher)
* astropy

Highly recommended, because some features will not be available without it:
Expand Down
2 changes: 1 addition & 1 deletion ginga/AstroImage.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def load_data(self, data_np, naxispath=None, metadata=None):

def load_buffer(self, buf, dims, dtype, byteswap=False,
naxispath=None, metadata=None):
data = np.fromstring(buf, dtype=dtype)
data = np.frombuffer(buf, dtype=dtype)
if byteswap:
data.byteswap(True)
data = data.reshape(dims)
Expand Down
2 changes: 1 addition & 1 deletion ginga/aggw/CanvasRenderAgg.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def get_surface_as_array(self, order=None):
wd, ht = self.dims

# Get agg surface as a numpy array
arr8 = np.fromstring(self.surface.tobytes(), dtype=np.uint8)
arr8 = np.frombuffer(self.surface.tobytes(), dtype=np.uint8)
arr8 = arr8.reshape((ht, wd, len(self.rgb_order)))

# adjust according to viewer's needed order
Expand Down
2 changes: 1 addition & 1 deletion ginga/pilw/CanvasRenderPil.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def get_surface_as_array(self, order=None):
wd, ht = self.dims[:2]

# Get PIL surface as a numpy array
arr8 = np.fromstring(self.surface.tobytes(), dtype=np.uint8)
arr8 = np.frombuffer(self.surface.tobytes(), dtype=np.uint8)
arr8 = arr8.reshape((ht, wd, 3))

# adjust according to viewer's needed order
Expand Down
2 changes: 1 addition & 1 deletion ginga/pilw/PilHelp.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def text_to_array(text, font, rot_deg=0.0):
d = ImageDraw.Draw(i, 'RGBA')
d.text((0, 0), text, font=f, fill=color)
i.rotate(rot_deg, expand=1)
arr8 = np.fromstring(i.tobytes(), dtype=np.uint8)
arr8 = np.frombuffer(i.tobytes(), dtype=np.uint8)
arr8 = arr8.reshape((ht, wd, 4))
return arr8

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ classifiers =
zip_safe = False
packages = find:
python_requires = >=3.7
install_requires = numpy>=1.13; qtpy>=1.1; astropy>=3.2
install_requires = numpy>=1.14; qtpy>=1.1; astropy>=3.2
setup_requires = setuptools_scm

[options.extras_require]
Expand Down