Skip to content

Commit

Permalink
Merge pull request #322 from analogdevicesinc/tfcollins/float-fix
Browse files Browse the repository at this point in the history
Fixed numpy deprecation warnings
  • Loading branch information
tfcollins authored Apr 6, 2022
2 parents 9c60f19 + ef36521 commit 81277d0
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion adi/adis16495.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class adis16495(rx, context_manager):
]
_device_name = ""
_rx_data_type = ">i4"
_rx_data_si_type = np.float
_rx_data_si_type = float

def __init__(self, uri="", name="adis16495-3"):
"""Initialize an adis16495 object.
Expand Down
2 changes: 1 addition & 1 deletion adi/adis16507.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class adis16507(rx, context_manager):
]
_device_name = ""
_rx_data_type = ">i4"
_rx_data_si_type = np.float
_rx_data_si_type = float

def __init__(
self, uri="", imu_dev_name="adis16507-3", trigger_name="adis16507-3-dev0"
Expand Down
2 changes: 1 addition & 1 deletion adi/adxl345.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class adxl345(rx, context_manager, attribute):
_device_name = "adxl345"
_rx_data_type = np.int32
_rx_unbuffered_data = True
_rx_data_si_type = np.float
_rx_data_si_type = float

def __init__(self, uri=""):

Expand Down
2 changes: 1 addition & 1 deletion adi/adxl355.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class adxl355(rx, context_manager, attribute):
_device_name = "adxl355"
_rx_data_type = np.int32
_rx_unbuffered_data = True
_rx_data_si_type = np.float
_rx_data_si_type = float

def __init__(self, uri=""):

Expand Down
2 changes: 1 addition & 1 deletion adi/adxrs290.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class adxrs290(rx, context_manager, attribute):
_device_name = "ADXRS290"
_rx_data_type = np.int16
_rx_unbuffered_data = True
_rx_data_si_type = np.float
_rx_data_si_type = float

def __init__(self, uri=""):

Expand Down
2 changes: 1 addition & 1 deletion adi/cn0540.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class cn0540(rx, context_manager):
"""CN0540 CBM DAQ Board"""

_rx_data_type = np.int32
_rx_data_si_type = np.float
_rx_data_si_type = float
_complex_data = False
_rx_channel_names = ["voltage0"]
_device_name = ""
Expand Down
4 changes: 2 additions & 2 deletions adi/ltc2983.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class ltc2983(rx, context_manager):
_device_name = "ltc2983"
_rx_unbuffered_data = True
_rx_data_type = np.int32
_rx_data_si_type = np.float
_rx_data_si_type = float

def __init__(self, uri=""):
context_manager.__init__(self, uri, self._device_name)
Expand Down Expand Up @@ -46,7 +46,7 @@ def raw(self):
@property
def scale(self):
"""Channel scale factor"""
return np.float(self._get_iio_attr_str(self.name, "scale", False))
return float(self._get_iio_attr_str(self.name, "scale", False))

@property
def value(self):
Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
numpy
pylibiio
fs.sshfs
numpy>=1.20
pylibiio==0.23.1
paramiko
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def _get_version():
url="https://github.com/analogdevicesinc/pyadi-iio",
packages=setuptools.find_packages(exclude=["test*"]),
python_requires=">=3.6",
install_requires=["numpy", "pylibiio==0.23.1"],
install_requires=["numpy>=1.20", "pylibiio==0.23.1"],
extras_require={"jesd": ["paramiko"]},
classifiers=[
"Programming Language :: Python :: 3",
Expand Down

0 comments on commit 81277d0

Please sign in to comment.