Skip to content

Accept integer function values in add_points#56

Draft
Mirochill wants to merge 1 commit into
dme65:masterfrom
Mirochill:fix-46-add-points-integer-fx
Draft

Accept integer function values in add_points#56
Mirochill wants to merge 1 commit into
dme65:masterfrom
Mirochill:fix-46-add-points-integer-fx

Conversation

@Mirochill

Copy link
Copy Markdown

Fixes #46

Summary:

  • normalize fx with np.asarray(...) before checking dimensionality, so Python integers and other scalar values follow the same path as floats
  • update the add_points() docstring to describe array-like or scalar function values
  • add a regression covering an integer objective value added to an RBF surrogate

Validation:

  • git diff --check
  • git diff --cached --check
  • git show --check --oneline HEAD -- pySOT/surrogate/surrogate.py tests/test_surrogates.py
  • git show --stat --oneline --summary HEAD
  • Static inspection of pySOT/surrogate/surrogate.py and tests/test_surrogates.py
  • Not run locally

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add_points() does not handle objective functions that output integers

1 participant