Jensen-holm commited on
Commit
ecb0c79
·
1 Parent(s): 8cc2d56

reverting more code back to python 3 syntax

Browse files
cluster/main.py CHANGED
@@ -14,8 +14,8 @@ def main(
14
  cluster_func = args.pop("algorithm")
15
  cluster_alg: Clusterer = clustering_methods[cluster_func]
16
 
17
- cluster_args: dict = {"cluster_func": cluster_func}.update(args)
18
- alg = cluster_alg.from_dict(cluster_args)
19
 
20
  alg.build(X)
21
  plot(clusterer=alg, X=X)
 
14
  cluster_func = args.pop("algorithm")
15
  cluster_alg: Clusterer = clustering_methods[cluster_func]
16
 
17
+ args.update({"cluster_func": cluster_func})
18
+ alg = cluster_alg.from_dict(args)
19
 
20
  alg.build(X)
21
  plot(clusterer=alg, X=X)
cluster/opts.py CHANGED
@@ -1,4 +1,3 @@
1
- from cluster.clusterer import Clusterer
2
  from cluster.kmedoids import Kmedoids
3
  from cluster.kmeans import Kmeans
4
 
 
 
1
  from cluster.kmedoids import Kmedoids
2
  from cluster.kmeans import Kmeans
3
 
neural_network/backprop.py CHANGED
@@ -24,7 +24,8 @@ def bp(
24
  wb: dict,
25
  args: dict,
26
  ) -> NeuralNetwork:
27
- model = NeuralNetwork.from_dict(args.update(wb))
 
28
  loss_history = []
29
  for _ in range(model.epochs):
30
  # forward prop
 
24
  wb: dict,
25
  args: dict,
26
  ) -> NeuralNetwork:
27
+ args.update(wb)
28
+ model = NeuralNetwork.from_dict(args)
29
  loss_history = []
30
  for _ in range(model.epochs):
31
  # forward prop