Skip to content

Commit

Permalink
PATCH: numpy deprecated np.float. replaced with 'float'
Browse files Browse the repository at this point in the history
  • Loading branch information
TomMonks committed Nov 23, 2023
1 parent 3ee4dd1 commit be954f8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
10 changes: 4 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,26 @@

setuptools.setup(
name="sim-tools",
#there must be an way to auto tick up the version number...
version=__version__,
author="Thomas Monks",
author_email="t.m.w.monks@exeter.ac.uk",
license="The MIT License (MIT)",
description="Simulation Tools for Education and Practice",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/TomMonks/ovs-tutorial",
url="https://github.com/TomMonks/sim-tools",
packages=setuptools.find_packages(),
#if true look in MANIFEST.in for data files to include
include_package_data=False,
#2nd approach to include data is include_package_data=False
#package_data={"test_package": ["data/*.csv"]},
#these are for documentation
classifiers=[
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
python_requires='>=3.6.9',
python_requires='>=3.10',
install_requires=requirements,
)
2 changes: 1 addition & 1 deletion sim_tools/ovs/fixed_budget.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def _allocate(self):

#got all of the ratios now...
more_runs = np.full(self._k, True, dtype=bool)
additional_runs = np.zeros(self._k, dtype=np.float)
additional_runs = np.zeros(self._k, dtype='float')
more_alloc = True

#do i need to use the more alloc or can i just use mask?
Expand Down
8 changes: 4 additions & 4 deletions sim_tools/ovs/toy_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ def __init__(self, model, n_designs, verbose=False):
model.register_observer(self)
self.verbose = verbose
self._n_designs = n_designs
self.means = np.zeros(n_designs, dtype=np.float)
self.vars = np.zeros(n_designs, dtype=np.float)
self._sq = np.zeros(n_designs, dtype=np.float)
self._ses = np.zeros(n_designs, dtype=np.float)
self.means = np.zeros(n_designs, dtype='float')
self.vars = np.zeros(n_designs, dtype='float')
self._sq = np.zeros(n_designs, dtype='float')
self._ses = np.zeros(n_designs, dtype='float')
self.allocations = np.zeros(n_designs, np.int32)

def __str__(self):
Expand Down

0 comments on commit be954f8

Please sign in to comment.