Skip to content

Commit

Permalink
lots of changes!
Browse files Browse the repository at this point in the history
  • Loading branch information
diceroll123 committed Mar 9, 2024
1 parent deda7cf commit 583626a
Show file tree
Hide file tree
Showing 35 changed files with 1,490 additions and 268 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ crate-type = ["cdylib"]
[dependencies]
pyo3 = { version = "0.20.2", features = ["extension-module", "abi3-py38"] }
numpy = "0.20.0"
itertools = "0.12.0"
neofoodclub = { path = "./neofoodclub_rs" }

[profile.release]
Expand Down
2 changes: 0 additions & 2 deletions neofoodclub/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@
from .models import *
from .modifier import *
from .neofoodclub import *
from .nfc import *
from .odds import *
from .odds_change import *
from .pirates import *

__all__ = (
"Math",
Expand Down
4 changes: 1 addition & 3 deletions neofoodclub/arenas.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

from typing import TYPE_CHECKING, Iterator, Sequence

from neofoodclub.neofoodclub import Math

from .pirates import Pirate
from neofoodclub.neofoodclub import Math, Pirate

if TYPE_CHECKING:
from .nfc import NeoFoodClub
Expand Down
10 changes: 7 additions & 3 deletions neofoodclub/bets.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
if TYPE_CHECKING:
import numpy.typing as npt

from neofoodclub.nfc import NeoFoodClub
from neofoodclub import NeoFoodClub

__all__ = ("Bets",)

Expand Down Expand Up @@ -87,7 +87,8 @@ def bet_amounts(self) -> npt.NDArray[np.int32]:

@bet_amounts.setter
def bet_amounts(
self, val: Sequence[int | None] | npt.NDArray[np.int32] | None,
self,
val: Sequence[int | None] | npt.NDArray[np.int32] | None,
) -> None:
if val is None:
self._bet_amounts: npt.NDArray[np.int32] = np.array(
Expand Down Expand Up @@ -144,7 +145,10 @@ def __repr__(self) -> str:

@classmethod
def _from_generator(
cls, *, indices: npt.NDArray[np.int16], nfc: NeoFoodClub,
cls,
*,
indices: npt.NDArray[np.int16],
nfc: NeoFoodClub,
) -> Bets:
# here is where we will take indices and sort as needed
# to avoid confusion with "manually" making bets
Expand Down
2 changes: 1 addition & 1 deletion neofoodclub/models/multinomial_logit.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from neofoodclub.models import BaseModel

if TYPE_CHECKING:
from neofoodclub.nfc import NeoFoodClub
from neofoodclub import NeoFoodClub

__all__ = [
"MultinomialLogitModel",
Expand Down
2 changes: 1 addition & 1 deletion neofoodclub/models/original.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from neofoodclub.neofoodclub import make_probabilities

if TYPE_CHECKING:
from neofoodclub.nfc import NeoFoodClub
from neofoodclub import NeoFoodClub


class OriginalModel(BaseModel):
Expand Down
2 changes: 1 addition & 1 deletion neofoodclub/modifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from typing import TYPE_CHECKING

if TYPE_CHECKING:
from neofoodclub.nfc import NeoFoodClub
from neofoodclub import NeoFoodClub

__all__ = ("Modifier",)

Expand Down
Loading

0 comments on commit 583626a

Please sign in to comment.