Skip to content

Commit df996dc

Browse files
committed
fixing last couple things
1 parent 21c3d38 commit df996dc

3 files changed

Lines changed: 2 additions & 3 deletions

File tree

pynumdiff/optimize/_optimize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def optimize(func, x, dt, search_space={}, dxdt_truth=None, tvgamma=1e-2, paddin
160160
singleton_params = {k:v for k,v in params.items() if not isinstance(v, list)}
161161

162162
# The search space is the Cartesian product of all dimensions where multiple options are given
163-
search_space_types = {k:type(v[0]) for k,v in params.items() if isinstance(v, list)} # map param name -> type for converting to and frompoint
163+
search_space_types = {k:type(v[0]) for k,v in params.items() if isinstance(v, list)} # map param name -> type for converting to and from point
164164
if any(v not in [float, int, bool] for v in search_space_types.values()):
165165
raise ValueError("Optimization over categorical strings currently not supported")
166166
# If excluding string type, I can just cast ints and bools to floats, and we're good to go

pynumdiff/tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ def pytest_sessionfinish(session, exitstatus):
1717
fig.legend(*axes[-1, -1].get_legend_handles_labels(), loc='lower left', ncol=2)
1818
fig.suptitle(method.__name__)
1919
fig.tight_layout()
20-
pyplot.show()
20+
pyplot.show()

pynumdiff/tests/test_diff_methods.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ def iterated_first_order(*args, **kwargs): return first_order(*args, **kwargs)
5252
(smooth_acceleration, {'gamma':2, 'window_size':5}), (smooth_acceleration, [2, 5]),
5353
(jerk_sliding, {'gamma':1, 'window_size':15}), (jerk_sliding, [1], {'window_size':15})
5454
]
55-
#diff_methods_and_params = [(second_order, {'num_iterations':1})]
5655

5756
# All the testing methodology follows the exact same pattern; the only thing that changes is the
5857
# closeness to the right answer various methods achieve with the given parameterizations. So index a

0 commit comments

Comments
 (0)