Skip to content

Commit

Permalink
Bug Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Pencilcaseman committed Oct 17, 2020
1 parent d5a0191 commit eb4b276
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 26 deletions.
28 changes: 16 additions & 12 deletions build/lib.win-amd64-3.8/libpymath/matrix/matrix.py
Expand Up @@ -13,22 +13,22 @@ def LPM_OPTIMAL_MATRIX_THREADS(self):
"D_SIGMOID", "D_TANH", "D_ReLU", "D_LEAKY_ReLU"]

# Matrix fill options
SCALAR = 0
ASCENDING = 1
DESCENDING = 2
RANDOM = 3
SCALAR = 1 << 0
ASCENDING = 1 << 1
DESCENDING = 1 << 2
RANDOM = 1 << 3

# Matrix map options
SIGMOID = 4
TANH = 5
ReLU = 6
LEAKY_ReLU = 7
SIGMOID = 1 << 4
TANH = 1 << 5
ReLU = 1 << 6
LEAKY_ReLU = 1 << 7

# Matrix map derivative options
D_SIGMOID = 8
D_TANH = 9
D_ReLU = 10
D_LEAKY_ReLU = 11
D_SIGMOID = 1 << 8
D_TANH = 1 << 9
D_ReLU = 1 << 10
D_LEAKY_ReLU = 1 << 11


# The Matrix class
Expand Down Expand Up @@ -184,6 +184,10 @@ def __init__(self, *args, **kwargs):
cols = len(tmp) // rows
if rows * cols != len(tmp):
raise ValueError("Impossible to make dimensions fit the supplied data. Closest fit is {}x{}".format(rows, cols))
else:
# No rows or columns specified
rows = 1
cols = len(data)
else:
# Check against a 2d list
if rows is not None and cols is not None:
Expand Down
Binary file added dist/libpymath-0.5.5-cp38-cp38-win_amd64.whl
Binary file not shown.
Binary file added dist/libpymath-0.5.5.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion libpymath.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: libpymath
Version: 0.5.4
Version: 0.5.5
Summary: A general purpose Python math module
Home-page: https://www.github.com/pencilcaseman/libpymath
Author: Toby Davis
Expand Down
28 changes: 16 additions & 12 deletions libpymath/matrix/matrix.py
Expand Up @@ -13,22 +13,22 @@ def LPM_OPTIMAL_MATRIX_THREADS(self):
"D_SIGMOID", "D_TANH", "D_ReLU", "D_LEAKY_ReLU"]

# Matrix fill options
SCALAR = 0
ASCENDING = 1
DESCENDING = 2
RANDOM = 3
SCALAR = 1 << 0
ASCENDING = 1 << 1
DESCENDING = 1 << 2
RANDOM = 1 << 3

# Matrix map options
SIGMOID = 4
TANH = 5
ReLU = 6
LEAKY_ReLU = 7
SIGMOID = 1 << 4
TANH = 1 << 5
ReLU = 1 << 6
LEAKY_ReLU = 1 << 7

# Matrix map derivative options
D_SIGMOID = 8
D_TANH = 9
D_ReLU = 10
D_LEAKY_ReLU = 11
D_SIGMOID = 1 << 8
D_TANH = 1 << 9
D_ReLU = 1 << 10
D_LEAKY_ReLU = 1 << 11


# The Matrix class
Expand Down Expand Up @@ -184,6 +184,10 @@ def __init__(self, *args, **kwargs):
cols = len(tmp) // rows
if rows * cols != len(tmp):
raise ValueError("Impossible to make dimensions fit the supplied data. Closest fit is {}x{}".format(rows, cols))
else:
# No rows or columns specified
rows = 1
cols = len(data)
else:
# Check against a 2d list
if rows is not None and cols is not None:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -207,7 +207,7 @@ def Wall():

setup(
name="libpymath",
version="0.5.4",
version="0.5.5",
description="A general purpose Python math module",
long_description=long_description,
long_description_content_type='text/markdown',
Expand Down

0 comments on commit eb4b276

Please sign in to comment.