Skip to content

Commit

Permalink
fixed a broken method
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Morris committed Apr 10, 2024
1 parent ed6cac5 commit b6e2c03
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docs/source/tutorials/himmelblau.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
"metadata": {},
"outputs": [],
"source": [
"RE(agent.learn(\"quasi-random\", n=32))\n",
"RE(agent.learn(\"quasi-random\", n=36))\n",
"agent.plot_objectives()"
]
},
Expand Down Expand Up @@ -294,7 +294,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.11.5 64-bit",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -308,7 +308,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.5"
"version": "3.10.0"
},
"vscode": {
"interpreter": {
Expand Down
2 changes: 1 addition & 1 deletion docs/source/tutorials/passive-dofs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.5"
"version": "3.10.0"
},
"vscode": {
"interpreter": {
Expand Down
4 changes: 2 additions & 2 deletions src/blop/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

mpl.rc("image", cmap="coolwarm")

DEFAULT_MAX_SAMPLES = 2**11
DEFAULT_MAX_SAMPLES = 2**12


def _validate_dofs_and_objs(dofs: DOFList, objs: ObjectiveList):
Expand Down Expand Up @@ -919,7 +919,7 @@ def train_targets(self, index=None, **subset_kwargs):
@property
def best(self):
"""Returns all data for the best point."""
return self.table.loc[self.argmax_best_f]
return self.table.loc[self.argmax_best_f.item()]

@property
def best_inputs(self):
Expand Down
2 changes: 2 additions & 0 deletions src/blop/tests/test_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
def test_agent(agent, RE):
RE(agent.learn("qr", n=4))

agent.best


def test_forget(agent, RE):
RE(agent.learn("qr", n=4))
Expand Down

0 comments on commit b6e2c03

Please sign in to comment.