gradboard 0.1.12__tar.gz → 0.1.14__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of gradboard might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: gradboard
3
- Version: 0.1.12
3
+ Version: 0.1.14
4
4
  Summary: Easily snowboard down gnarly loss gradients
5
5
  License: MIT
6
6
  Author: Nicholas Bailey
@@ -37,7 +37,7 @@ def cosine(step: int, total_steps: int) -> float:
37
37
  return round((math.cos(angle) + 1) / 2, 8)
38
38
 
39
39
 
40
- def semicircle(step: int, total_steps: int) -> float:
40
+ def quarter_circle(step: int, total_steps: int) -> float:
41
41
  """
42
42
  Get a sequence of numbers between 0 and 1 in the shape of a semi-circle with
43
43
  diameter `total_steps'.
@@ -51,14 +51,6 @@ def semicircle(step: int, total_steps: int) -> float:
51
51
  return math.sqrt(y_squared)
52
52
 
53
53
 
54
- def half_semicircle(step: int, total_steps: int) -> float:
55
- """
56
- Get a sequence of numbers between 0 and 1 in the shape of the descending
57
- half of a cosine wave with wavelength 2*`total_steps`.
58
- """
59
- return semicircle(step, (total_steps * 2) - 1)
60
-
61
-
62
54
  def half_cosine(step: int, total_steps: int) -> float:
63
55
  """
64
56
  Get a sequence of numbers between 0 and 1 in the shape of the descending
@@ -139,6 +131,8 @@ class Cycle:
139
131
  "`generating_function` must be a callable object or one of "
140
132
  '"ascent", "triangle", "cosine", "half_cosine" or "half_cycloid"'
141
133
  )
134
+ else:
135
+ self._generating_function = generating_function
142
136
 
143
137
  def _get_window(self, step):
144
138
  windows = self._windows()
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "gradboard"
3
- version = "0.1.12"
3
+ version = "0.1.14"
4
4
  description = "Easily snowboard down gnarly loss gradients"
5
5
  authors = [
6
6
  {name = "Nicholas Bailey"}
File without changes
File without changes