Skip to content

Commit

Permalink
fucking relative imports (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmic-cortex authored Oct 26, 2024
1 parent 3506a0a commit bbfd7c1
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion mlfz/classical/knn.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import numpy as np
from scipy.spatial.distance import cdist
from .base import Model
from mlfz.classical.base import Model


class KNNClassifier(Model):
Expand Down
2 changes: 1 addition & 1 deletion mlfz/classical/linear.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import numpy as np
from .base import Model
from ..functional.numpy import sigmoid
from mlfz.functional.numpy import sigmoid


def _augment_data(X: np.array):
Expand Down
2 changes: 1 addition & 1 deletion mlfz/classical/pipeline.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import numpy as np
from typing import Iterable
from .base import Model
from mlfz.classical.base import Model


class Pipeline(Model):
Expand Down
2 changes: 1 addition & 1 deletion mlfz/classical/scaler.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import numpy as np
from .base import Model
from mlfz.classical.base import Model


class Normalize(Model):
Expand Down
2 changes: 1 addition & 1 deletion mlfz/classical/tree/cart.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import numpy as np
from graphviz import Digraph
from typing import List, Callable
from ..base import Model
from mlfz.classical.base import Model


def most_frequent_label(Y):
Expand Down
2 changes: 1 addition & 1 deletion mlfz/datasets.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import numpy as np
from .functional.numpy import sigmoid
from mlfz.functional.numpy import sigmoid


def generate_clusters(n_clusters, n_features, points_per_cluster, spread=1.0):
Expand Down
4 changes: 2 additions & 2 deletions mlfz/nn/scalar/functional.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import math
from .core import Scalar, Edge
from ...functional import vanilla as f
from mlfz.nn.scalar.core import Scalar, Edge
from mlfz.functional import vanilla as f


def sin(x: Scalar):
Expand Down
4 changes: 2 additions & 2 deletions mlfz/nn/scalar/loss.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import math
from .core import Scalar
from .functional import log
from mlfz.nn.scalar.core import Scalar
from mlfz.nn.scalar.functional import log
from typing import List


Expand Down
6 changes: 3 additions & 3 deletions mlfz/nn/tensor/functional.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import numpy as np
from .core import Tensor, Edge
from .core.utils import _pointwise
from ...functional import numpy as f
from mlfz.nn.tensor.core import Tensor, Edge
from mlfz.nn.tensor.core.utils import _pointwise
from mlfz.functional import numpy as f


def exp(x: Tensor):
Expand Down
4 changes: 2 additions & 2 deletions mlfz/nn/tensor/loss.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from .core import Tensor
from .functional import log
from mlfz.nn.tensor import Tensor
from mlfz.nn.tensor.functional import log


def mean_squared_error(preds: Tensor, ys: Tensor) -> Tensor:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

setup(
name="mlfz",
version="0.1.3",
version="0.1.3.1",
author="Tivadar Danka",
description="Machine Learning From Zero: an educational machine learning library.",
long_description=open("README.md").read(),
Expand Down

0 comments on commit bbfd7c1

Please sign in to comment.