Skip to content

Commit

Permalink
Simplify tests 🐍 (#27)
Browse files Browse the repository at this point in the history
* Prepare for data fixture

* Simplify code + improve typehints
  • Loading branch information
KarelZe authored Dec 11, 2023
1 parent 5bdbdf5 commit 2400cc2
Show file tree
Hide file tree
Showing 3 changed files with 284 additions and 300 deletions.
4 changes: 2 additions & 2 deletions src/tclf/classical_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,11 +340,11 @@ def _trade_size(self, subset: str) -> npt.NDArray:
)

ts_eq_bid = (
np.isclose(self.X_["TRADE_SIZE"], self.X_[f"bid_size_{subset}"], atol=1e-4)
np.isclose(self.X_["trade_size"], self.X_[f"bid_size_{subset}"], atol=1e-4)
& ~bid_eq_ask
)
ts_eq_ask = (
np.isclose(self.X_["TRADE_SIZE"], self.X_[f"ask_size_{subset}"], atol=1e-4)
np.isclose(self.X_["trade_size"], self.X_[f"ask_size_{subset}"], atol=1e-4)
& ~bid_eq_ask
)

Expand Down
47 changes: 0 additions & 47 deletions tests/templates.py

This file was deleted.

Loading

0 comments on commit 2400cc2

Please sign in to comment.