sparse-convolution 0.1.4__tar.gz → 0.1.5__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.
- {sparse_convolution-0.1.4/sparse_convolution.egg-info → sparse_convolution-0.1.5}/PKG-INFO +1 -1
- {sparse_convolution-0.1.4 → sparse_convolution-0.1.5}/sparse_convolution/__init__.py +1 -1
- {sparse_convolution-0.1.4 → sparse_convolution-0.1.5}/sparse_convolution/sparse_convolution.py +2 -2
- {sparse_convolution-0.1.4 → sparse_convolution-0.1.5/sparse_convolution.egg-info}/PKG-INFO +1 -1
- {sparse_convolution-0.1.4 → sparse_convolution-0.1.5}/tests/test_unit.py +1 -1
- {sparse_convolution-0.1.4 → sparse_convolution-0.1.5}/LICENSE +0 -0
- {sparse_convolution-0.1.4 → sparse_convolution-0.1.5}/MANIFEST.in +0 -0
- {sparse_convolution-0.1.4 → sparse_convolution-0.1.5}/README.md +0 -0
- {sparse_convolution-0.1.4 → sparse_convolution-0.1.5}/requirements.txt +0 -0
- {sparse_convolution-0.1.4 → sparse_convolution-0.1.5}/setup.cfg +0 -0
- {sparse_convolution-0.1.4 → sparse_convolution-0.1.5}/setup.py +0 -0
- {sparse_convolution-0.1.4 → sparse_convolution-0.1.5}/sparse_convolution.egg-info/SOURCES.txt +0 -0
- {sparse_convolution-0.1.4 → sparse_convolution-0.1.5}/sparse_convolution.egg-info/dependency_links.txt +0 -0
- {sparse_convolution-0.1.4 → sparse_convolution-0.1.5}/sparse_convolution.egg-info/requires.txt +0 -0
- {sparse_convolution-0.1.4 → sparse_convolution-0.1.5}/sparse_convolution.egg-info/top_level.txt +0 -0
{sparse_convolution-0.1.4 → sparse_convolution-0.1.5}/sparse_convolution/sparse_convolution.py
RENAMED
|
@@ -68,8 +68,8 @@ class Toeplitz_convolution2d():
|
|
|
68
68
|
matrix.
|
|
69
69
|
"""
|
|
70
70
|
## Type checking
|
|
71
|
-
assert isinstance(x_shape, tuple), "x_shape must be a tuple"
|
|
72
|
-
assert all([isinstance(s, (int, float)) for s in x_shape]), "x_shape must be a tuple of integers"
|
|
71
|
+
assert isinstance(x_shape, (tuple, list)), f"x_shape must be a tuple. Found: {type(x_shape)}"
|
|
72
|
+
assert all([isinstance(s, (int, float, np.integer, np.floating)) for s in x_shape]), f"x_shape must be a tuple of integers. Found: {[type(s) for s in x_shape]}"
|
|
73
73
|
x_shape = (int(x_shape[0]), int(x_shape[1]))
|
|
74
74
|
|
|
75
75
|
assert isinstance(k, np.ndarray), "k must be a numpy array"
|
|
@@ -40,7 +40,7 @@ def test_toeplitz_convolution2d():
|
|
|
40
40
|
success = False
|
|
41
41
|
break
|
|
42
42
|
try:
|
|
43
|
-
if np.allclose(out_t2d, out_t2d_s.
|
|
43
|
+
if np.allclose(out_t2d, out_t2d_s.toarray()) and np.allclose(out_t2d, out_sp) and np.allclose(out_sp, out_t2d_s.toarray()):
|
|
44
44
|
success = True
|
|
45
45
|
continue
|
|
46
46
|
except Exception as e:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sparse_convolution-0.1.4 → sparse_convolution-0.1.5}/sparse_convolution.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sparse_convolution-0.1.4 → sparse_convolution-0.1.5}/sparse_convolution.egg-info/requires.txt
RENAMED
|
File without changes
|
{sparse_convolution-0.1.4 → sparse_convolution-0.1.5}/sparse_convolution.egg-info/top_level.txt
RENAMED
|
File without changes
|