Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-lazyarray for
openSUSE:Factory checked in at 2026-03-16 14:17:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-lazyarray (Old)
and /work/SRC/openSUSE:Factory/.python-lazyarray.new.8177 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-lazyarray"
Mon Mar 16 14:17:14 2026 rev:8 rq:1339178 version:0.7.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-lazyarray/python-lazyarray.changes
2025-03-19 22:34:25.087879834 +0100
+++
/work/SRC/openSUSE:Factory/.python-lazyarray.new.8177/python-lazyarray.changes
2026-03-16 14:20:30.345199055 +0100
@@ -1,0 +2,8 @@
+Sun Mar 15 21:31:56 UTC 2026 - Dirk Müller <[email protected]>
+
+- update to 0.7.0:
+ * Minor updates to work with recent versions of NumPy and SciPy
+ * Add support for Python 3.13, 3.14; remove testing for Python
+ 3.9 and below, and for NumPy 1.22 and below.
+
+-------------------------------------------------------------------
Old:
----
lazyarray-0.6.0.tar.gz
New:
----
lazyarray-0.7.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-lazyarray.spec ++++++
--- /var/tmp/diff_new_pack.wvqisz/_old 2026-03-16 14:20:30.965224836 +0100
+++ /var/tmp/diff_new_pack.wvqisz/_new 2026-03-16 14:20:30.965224836 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-lazyarray
#
-# Copyright (c) 2025 SUSE LLC
+# Copyright (c) 2026 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
%{?sle15_python_module_pythons}
Name: python-lazyarray
-Version: 0.6.0
+Version: 0.7.0
Release: 0
Summary: Lazily-evaluated numerical array class, compatible with NumPy
arrays
License: BSD-3-Clause
++++++ lazyarray-0.6.0.tar.gz -> lazyarray-0.7.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lazyarray-0.6.0/LICENSE new/lazyarray-0.7.0/LICENSE
--- old/lazyarray-0.6.0/LICENSE 2024-09-05 17:27:11.000000000 +0200
+++ new/lazyarray-0.7.0/LICENSE 2026-01-21 14:12:47.000000000 +0100
@@ -1,10 +1,10 @@
-Copyright (c) 2012-2024, Andrew P. Davison, Joël Chavas, Elodie Legouée (CNRS)
and Ankur Sinha (UCL)
+Copyright (c) 2012-2026, Andrew P. Davison, Joël Chavas, Elodie Legouée (CNRS)
and Ankur Sinha (UCL)
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
-Neither the names of the copyright holders nor the names of the contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
+* Neither the names of the copyright holders nor the names of the contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lazyarray-0.6.0/PKG-INFO new/lazyarray-0.7.0/PKG-INFO
--- old/lazyarray-0.6.0/PKG-INFO 2024-09-05 18:40:37.844083800 +0200
+++ new/lazyarray-0.7.0/PKG-INFO 2026-01-21 14:13:07.419013700 +0100
@@ -1,10 +1,10 @@
-Metadata-Version: 2.1
+Metadata-Version: 2.4
Name: lazyarray
-Version: 0.6.0
+Version: 0.7.0
Summary: A Python package that provides a lazily-evaluated numerical array
class, larray, based on and compatible with NumPy arrays.
Author-email: "Andrew P. Davison" <[email protected]>
Maintainer-email: "Andrew P. Davison" <[email protected]>
-License: Modified BSD
+License-Expression: BSD-3-Clause
Project-URL: homepage, https://github.com/NeuralEnsemble/lazyarray/
Project-URL: documentation, https://lazyarray.readthedocs.io/
Project-URL: repository, https://github.com/NeuralEnsemble/lazyarray/
@@ -13,23 +13,23 @@
Keywords: lazy evaluation, array
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
-Classifier: License :: OSI Approved :: BSD License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering
-Requires-Python: >=3.8
+Requires-Python: >=3.10
Description-Content-Type: text/x-rst
License-File: LICENSE
-Requires-Dist: numpy>=1.20.3
+Requires-Dist: numpy>=1.23.5
Provides-Extra: sparse
-Requires-Dist: scipy>=1.7.3; extra == "sparse"
+Requires-Dist: scipy>=1.9.3; extra == "sparse"
Provides-Extra: dev
Requires-Dist: sphinx; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: flake8; extra == "dev"
Requires-Dist: wheel; extra == "dev"
+Dynamic: license-file
=========
@@ -56,7 +56,7 @@
.. image:: https://readthedocs.org/projects/lazyarray/badge/?version=latest
:target: http://lazyarray.readthedocs.io/en/latest/
-.. image::
https://github.com/NeuralEnsemble/lazyarrays/actions/workflows/test.yml/badge.svg
+.. image::
https://github.com/NeuralEnsemble/lazyarray/actions/workflows/test.yml/badge.svg
:target: https://github.com/NeuralEnsemble/lazyarray/actions
.. image::
https://coveralls.io/repos/github/NeuralEnsemble/lazyarray/badge.svg?branch=master
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lazyarray-0.6.0/README.rst
new/lazyarray-0.7.0/README.rst
--- old/lazyarray-0.6.0/README.rst 2024-09-05 17:37:48.000000000 +0200
+++ new/lazyarray-0.7.0/README.rst 2026-01-21 14:12:47.000000000 +0100
@@ -23,7 +23,7 @@
.. image:: https://readthedocs.org/projects/lazyarray/badge/?version=latest
:target: http://lazyarray.readthedocs.io/en/latest/
-.. image::
https://github.com/NeuralEnsemble/lazyarrays/actions/workflows/test.yml/badge.svg
+.. image::
https://github.com/NeuralEnsemble/lazyarray/actions/workflows/test.yml/badge.svg
:target: https://github.com/NeuralEnsemble/lazyarray/actions
.. image::
https://coveralls.io/repos/github/NeuralEnsemble/lazyarray/badge.svg?branch=master
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lazyarray-0.6.0/changelog.txt
new/lazyarray-0.7.0/changelog.txt
--- old/lazyarray-0.6.0/changelog.txt 2024-09-05 18:37:21.000000000 +0200
+++ new/lazyarray-0.7.0/changelog.txt 2026-01-21 14:12:47.000000000 +0100
@@ -136,6 +136,12 @@
* Tested with NumPy 2.0, minimum NumPy version tested is now 1.20.
* Switch to GitHub Actions for continuous integration testing.
+Release 0.7.0
+=============
+
+* Minor updates to work with recent versions of NumPy and SciPy
+* Add support for Python 3.13, 3.14; remove testing for Python 3.9 and below,
and for NumPy 1.22 and below.
+
.. _`#3`: https://bitbucket.org/apdavison/lazyarray/issue/3/
.. _`#4`: https://bitbucket.org/apdavison/lazyarray/issue/4/
.. _`#5`: https://bitbucket.org/apdavison/lazyarray/issue/5/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lazyarray-0.6.0/doc/installation.txt
new/lazyarray-0.7.0/doc/installation.txt
--- old/lazyarray-0.6.0/doc/installation.txt 2024-09-05 17:00:52.000000000
+0200
+++ new/lazyarray-0.7.0/doc/installation.txt 2026-01-21 14:12:47.000000000
+0100
@@ -5,9 +5,9 @@
Dependencies
============
- * Python >= 3.8
- * numpy_ >= 1.20
- * (optional) scipy_ >= 1.7
+ * Python >= 3.10
+ * numpy_ >= 1.23
+ * (optional) scipy_ >= 1.9
Installing from the Python Package Index
========================================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lazyarray-0.6.0/lazyarray.egg-info/PKG-INFO
new/lazyarray-0.7.0/lazyarray.egg-info/PKG-INFO
--- old/lazyarray-0.6.0/lazyarray.egg-info/PKG-INFO 2024-09-05
18:40:37.000000000 +0200
+++ new/lazyarray-0.7.0/lazyarray.egg-info/PKG-INFO 2026-01-21
14:13:07.000000000 +0100
@@ -1,10 +1,10 @@
-Metadata-Version: 2.1
+Metadata-Version: 2.4
Name: lazyarray
-Version: 0.6.0
+Version: 0.7.0
Summary: A Python package that provides a lazily-evaluated numerical array
class, larray, based on and compatible with NumPy arrays.
Author-email: "Andrew P. Davison" <[email protected]>
Maintainer-email: "Andrew P. Davison" <[email protected]>
-License: Modified BSD
+License-Expression: BSD-3-Clause
Project-URL: homepage, https://github.com/NeuralEnsemble/lazyarray/
Project-URL: documentation, https://lazyarray.readthedocs.io/
Project-URL: repository, https://github.com/NeuralEnsemble/lazyarray/
@@ -13,23 +13,23 @@
Keywords: lazy evaluation, array
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
-Classifier: License :: OSI Approved :: BSD License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering
-Requires-Python: >=3.8
+Requires-Python: >=3.10
Description-Content-Type: text/x-rst
License-File: LICENSE
-Requires-Dist: numpy>=1.20.3
+Requires-Dist: numpy>=1.23.5
Provides-Extra: sparse
-Requires-Dist: scipy>=1.7.3; extra == "sparse"
+Requires-Dist: scipy>=1.9.3; extra == "sparse"
Provides-Extra: dev
Requires-Dist: sphinx; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: flake8; extra == "dev"
Requires-Dist: wheel; extra == "dev"
+Dynamic: license-file
=========
@@ -56,7 +56,7 @@
.. image:: https://readthedocs.org/projects/lazyarray/badge/?version=latest
:target: http://lazyarray.readthedocs.io/en/latest/
-.. image::
https://github.com/NeuralEnsemble/lazyarrays/actions/workflows/test.yml/badge.svg
+.. image::
https://github.com/NeuralEnsemble/lazyarray/actions/workflows/test.yml/badge.svg
:target: https://github.com/NeuralEnsemble/lazyarray/actions
.. image::
https://coveralls.io/repos/github/NeuralEnsemble/lazyarray/badge.svg?branch=master
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lazyarray-0.6.0/lazyarray.egg-info/SOURCES.txt
new/lazyarray-0.7.0/lazyarray.egg-info/SOURCES.txt
--- old/lazyarray-0.6.0/lazyarray.egg-info/SOURCES.txt 2024-09-05
18:40:37.000000000 +0200
+++ new/lazyarray-0.7.0/lazyarray.egg-info/SOURCES.txt 2026-01-21
14:13:07.000000000 +0100
@@ -16,6 +16,5 @@
lazyarray.egg-info/dependency_links.txt
lazyarray.egg-info/requires.txt
lazyarray.egg-info/top_level.txt
-test/test_lazy_arrays_from_Sparse_Matrices.py
test/test_lazyarray.py
test/test_ufunc.py
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lazyarray-0.6.0/lazyarray.egg-info/requires.txt
new/lazyarray-0.7.0/lazyarray.egg-info/requires.txt
--- old/lazyarray-0.6.0/lazyarray.egg-info/requires.txt 2024-09-05
18:40:37.000000000 +0200
+++ new/lazyarray-0.7.0/lazyarray.egg-info/requires.txt 2026-01-21
14:13:07.000000000 +0100
@@ -1,4 +1,4 @@
-numpy>=1.20.3
+numpy>=1.23.5
[dev]
sphinx
@@ -8,4 +8,4 @@
wheel
[sparse]
-scipy>=1.7.3
+scipy>=1.9.3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lazyarray-0.6.0/lazyarray.py
new/lazyarray-0.7.0/lazyarray.py
--- old/lazyarray-0.6.0/lazyarray.py 2024-09-05 17:37:48.000000000 +0200
+++ new/lazyarray-0.7.0/lazyarray.py 2026-01-21 14:12:47.000000000 +0100
@@ -29,7 +29,7 @@
from collections import Iterator
-__version__ = "0.6.0"
+__version__ = "0.7.0"
logger = logging.getLogger("lazyarray")
@@ -510,10 +510,10 @@
x = x.reshape(self._shape)
elif have_scipy and sparse.issparse(self.base_value): # For sparse
matrices
if empty_val != 0:
- x = self.base_value.toarray((sparse.csc_matrix))
+ x = self.base_value.toarray()
x = np.where(x, x, np.nan)
else:
- x = self.base_value.toarray((sparse.csc_matrix))
+ x = self.base_value.toarray()
elif isinstance(self.base_value, Iterator):
x = np.fromiter(self.base_value, dtype=self.dtype or float,
count=self.size)
if x.shape != self._shape:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lazyarray-0.6.0/pyproject.toml
new/lazyarray-0.7.0/pyproject.toml
--- old/lazyarray-0.6.0/pyproject.toml 2024-09-05 18:40:27.000000000 +0200
+++ new/lazyarray-0.7.0/pyproject.toml 2026-01-21 14:12:47.000000000 +0100
@@ -1,10 +1,10 @@
[project]
name = "lazyarray"
-version = "0.6.0"
+version = "0.7.0"
description = "A Python package that provides a lazily-evaluated numerical
array class, larray, based on and compatible with NumPy arrays."
readme = "README.rst"
-requires-python = ">=3.8"
-license = {text = "Modified BSD"}
+requires-python = ">=3.10"
+license = "BSD-3-Clause"
authors = [
{name = "Andrew P. Davison", email = "[email protected]"}
]
@@ -15,18 +15,17 @@
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
- "License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering"
]
dependencies = [
- "numpy>=1.20.3"
+ "numpy>=1.23.5"
]
[project.optional-dependencies]
-sparse = ["scipy>=1.7.3"]
+sparse = ["scipy>=1.9.3"]
dev = ["sphinx", "pytest", "pytest-cov", "flake8", "wheel"]
[project.urls]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/lazyarray-0.6.0/test/test_lazy_arrays_from_Sparse_Matrices.py
new/lazyarray-0.7.0/test/test_lazy_arrays_from_Sparse_Matrices.py
--- old/lazyarray-0.6.0/test/test_lazy_arrays_from_Sparse_Matrices.py
2022-03-03 15:50:13.000000000 +0100
+++ new/lazyarray-0.7.0/test/test_lazy_arrays_from_Sparse_Matrices.py
1970-01-01 01:00:00.000000000 +0100
@@ -1,211 +0,0 @@
-# Support creating lazy arrays from SciPy sparse matrices
-#
-# 1 program for the 7 sparse matrices classes :
-#
-# csc_matrix(arg1[, shape, dtype, copy]) Compressed Sparse
Column matrix
-# csr_matrix(arg1[, shape, dtype, copy]) Compressed Sparse
Row matrix
-# bsr_matrix(arg1[, shape, dtype, copy, blocksize]) Block Sparse Row
matrix
-# lil_matrix(arg1[, shape, dtype, copy]) Row-based linked
list sparse matrix
-# dok_matrix(arg1[, shape, dtype, copy]) Dictionary Of Keys
based sparse matrix.
-# coo_matrix(arg1[, shape, dtype, copy]) A sparse matrix in
COOrdinate format.
-# dia_matrix(arg1[, shape, dtype, copy]) Sparse matrix with
DIAgonal storage
-#
-
-
-import numpy as np
-from lazyarray import larray
-from scipy import sparse
-import random
-
-
-################
-# Random numbers
-################
-i = random.randint(-100, 100)
-j = random.randint(-100, 100)
-k = random.randint(-100, 100)
-l = random.randint(-100, 100)
-m = random.randint(-100, 100)
-n = random.randint(-100, 100)
-p = random.randint(-100, 100)
-q = random.randint(-100, 100)
-r = random.randint(-100, 100)
-
-################
-# An example
-################
-#i = 1
-#j = 2
-#k = 0
-#l = 0
-#m = 0
-#n = 3
-#p = 1
-#q = 0
-#r = 4
-
-#print "i =", i
-#print "j =", j
-#print "k =", k
-#print "l =", l
-#print "m =", m
-#print "n =", n
-#print "p =", p
-#print "q =", q
-#print "r =", r
-
-
-##############################################################
-# Definition of an array
-##############################################################
-
-def test_function_array_general():
- A = np.array([[i, j, k], [l, m, n], [p, q, r]])
- #print "A ="
- #print A
- return A
-
-
-##############################################################
-# Definition of 7 sparse matrices
-##############################################################
-
-def sparse_csc_matrices():
- csc = sparse.csc_matrix([[i, j, k], [l, m, n], [p, q, r]])
- #print "csc matrices ="
- #print csc
- return csc
-
-def sparse_csr_matrices():
- csr = sparse.csr_matrix([[i, j, k], [l, m, n], [p, q, r]])
- #print "csr matrices ="
- #print csr
- return csr
-
-def sparse_bsr_matrices():
- bsr = sparse.bsr_matrix([[i, j, k], [l, m, n], [p, q, r]])
- #print "bsr matrices ="
- #print bsr
- return bsr
-
-def sparse_lil_matrices():
- lil = sparse.lil_matrix([[i, j, k], [l, m, n], [p, q, r]])
- #print "lil matrices ="
- #print lil
- return lil
-
-def sparse_dok_matrices():
- dok = sparse.dok_matrix([[i, j, k], [l, m, n], [p, q, r]])
- #print "dok matrices ="
- #print dok
- return dok
-
-def sparse_coo_matrices():
- coo = sparse.coo_matrix([[i, j, k], [l, m, n], [p, q, r]])
- #print "coo matrices ="
- #print coo
- return coo
-
-def sparse_dia_matrices():
- dia = sparse.dia_matrix([[i, j, k], [l, m, n], [p, q, r]])
- #print "dia matrices ="
- #print dia
- return dia
-
-
-
-if __name__ == "__main__":
-
-
-##############################################################
-# Call test_function_array_general
-# Create a sparse matrix from array
-# There are 7 sparse matrices
-##############################################################
-
- #print "Array general ="
- test_function_array_general()
- #print "Array ="
- #print test_function_array_general()
-
-# print "----"
-
-# print "Sparse array csc general ="
- sA_csc_general = sparse.csc_matrix(test_function_array_general())
- #print ("sparse csc matrices",
sparse.csc_matrix(test_function_array_general()))
- #print "sparse csc matrices ="
- #print sA_csc_general
-# print "----"
-# print "Sparse array csr general ="
- sA_csr = sparse.csr_matrix(test_function_array_general())
- #print ("sparse csr matrices",
sparse.csr_matrix(test_function_array_general()))
- #print "sparse csr matrices ="
- #print sA_csr
-# print "----"
-# print "Sparse array bsr general ="
- sA_bsr = sparse.bsr_matrix(test_function_array_general())
-# print ("sparse bsr matrices",
sparse.bsr_matrix(test_function_array_general()))
-# print "sparse bsr matrices ="
-# print sA_bsr
-# print "----"
-# print "Sparse array lil general ="
- sA_lil = sparse.lil_matrix(test_function_array_general())
-# print ("sparse lil matrices",
sparse.lil_matrix(test_function_array_general()))
-# print "sparse lil matrices ="
-# print sA_lil
-# print "----"
-# print "Sparse array dok general ="
- sA_dok = sparse.dok_matrix(test_function_array_general())
-# print ("sparse dok matrices",
sparse.dok_matrix(test_function_array_general()))
-# print "sparse dok matrices ="
-# print sA_dok
-# print "----"
-# print "Sparse array coo general ="
- sA_coo = sparse.coo_matrix(test_function_array_general())
-# print ("sparse coo matrices",
sparse.coo_matrix(test_function_array_general()))
-# print "sparse coo matrices ="
-# print sA_coo
-# print "----"
-# print "Sparse array dia general ="
- sA_dia = sparse.dia_matrix(test_function_array_general())
-# print ("sparse dia matrices",
sparse.dia_matrix(test_function_array_general()))
-# print "sparse dia matrices ="
-# print sA_dia
-
-
-#print "----------------------------------------------------------------------"
-
-
- ##############################################################
- # Call the sparse matrices
- # Create a lazy array from sparse matrices
- ##############################################################
-
-
-Array_csc_matrices = sparse_csc_matrices().toarray()
-#print "Array csc matrices ="
-#print Array_csc_matrices
-
-Array_csr_matrices = sparse_csr_matrices().toarray()
-#print "Array csr matrices ="
-#print Array_csr_matrices
-
-Array_bsr_matrices = sparse_bsr_matrices().toarray()
-#print "Array bsr matrices ="
-#print Array_bsr_matrices
-
-Array_lil_matrices = sparse_lil_matrices().toarray()
-#print "Array lil matrices ="
-#print Array_lil_matrices
-
-Array_dok_matrices = sparse_dok_matrices().toarray()
-#print "Array dok matrices ="
-#print Array_dok_matrices
-
-Array_coo_matrices = sparse_coo_matrices().toarray()
-#print "Array coo matrices ="
-#print Array_coo_matrices
-
-Array_dia_matrices = sparse_dia_matrices().toarray()
-#print "Array dia matrices ="
-#print Array_dia_matrices
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lazyarray-0.6.0/test/test_lazyarray.py
new/lazyarray-0.7.0/test/test_lazyarray.py
--- old/lazyarray-0.6.0/test/test_lazyarray.py 2024-09-05 17:27:30.000000000
+0200
+++ new/lazyarray-0.7.0/test/test_lazyarray.py 2026-01-21 14:12:48.000000000
+0100
@@ -121,8 +121,8 @@
data_dia = np.array([[1, 2, 3, 4]]).repeat(3, axis=0) # For dia_matrix
offsets_dia = np.array([0, -1, 2]) # For dia_matrix
dia = larray(dia_matrix((data_dia, offsets_dia), shape=(4, 4))) # For
dia_matrix
- dok = larray(dok_matrix(((row, col)), shape=(3, 3))) # For dok_matrix
- lil = larray(lil_matrix(data, shape=(3, 3))) # For lil_matrix
+ dok = larray(dok_matrix((np.vstack((row, col))), shape=(2, 6))) # For
dok_matrix
+ lil = larray(lil_matrix(data, shape=(1, 6))) # For lil_matrix
assert bsr.shape == (3, 3)
assert coo.shape == (3, 3)
assert csc.shape == (3, 3)
@@ -136,47 +136,63 @@
assert_array_equal(coo.evaluate(), coo_matrix((data, (row,
col))).toarray()) # For coo_matrix
assert_array_equal(csc.evaluate(), csc_matrix((data, (row,
col))).toarray()) # For csc_matrix
assert_array_equal(csr.evaluate(), csr_matrix((data, (row,
col))).toarray()) # For csr_matrix
- assert_array_equal(dia.evaluate(), dia_matrix((data_dia, (row,
col))).toarray()) # For dia_matrix
- assert_array_equal(dok.evaluate(), dok_matrix((data, (row,
col))).toarray()) # For dok_matrix
- assert_array_equal(lil.evaluate(), lil_matrix((data, (row,
col))).toarray()) # For lil_matrix
+ assert_array_equal(dia.evaluate(), dia_matrix((data_dia, offsets_dia),
shape=(4, 4)).toarray()) # For dia_matrix
+ assert_array_equal(dok.evaluate(), dok_matrix((np.vstack((row, col))),
shape=(2, 6)).toarray()) # For dok_matrix
+ assert_array_equal(lil.evaluate(), lil_matrix(data, shape=(1,
6)).toarray()) # For lil_matrix
+ test_evaluate_with_sparse_array()
def test_multiple_operations_with_sparse_array():
# For bsr_matrix
- bsr0 = bsr /100.0
+ bsr0 = bsr / 100.0
bsr1 = 0.2 + bsr0
assert_array_almost_equal(bsr0.evaluate(), np.array([[0.01, 0., 0.04],
[0., 0., 0.05], [0.02, 0.03, 0.06]]))
- assert_array_almost_equal(bsr0.evaluate(), np.array([[0.21, 0.2,
0.24], [0.2, 0.2, 0.25], [0.22, 0.23, 0.26]]))
+ assert_array_almost_equal(bsr1.evaluate(), np.array([[0.21, 0.2,
0.24], [0.2, 0.2, 0.25], [0.22, 0.23, 0.26]]))
# For coo_matrix
- coo0 = coo /100.0
+ coo0 = coo / 100.0
coo1 = 0.2 + coo0
assert_array_almost_equal(coo0.evaluate(), np.array([[0.01, 0., 0.04],
[0., 0., 0.05], [0.02, 0.03, 0.06]]))
- assert_array_almost_equal(coo0.evaluate(), np.array([[0.21, 0.2,
0.24], [0.2, 0.2, 0.25], [0.22, 0.23, 0.26]]))
+ assert_array_almost_equal(coo1.evaluate(), np.array([[0.21, 0.2,
0.24], [0.2, 0.2, 0.25], [0.22, 0.23, 0.26]]))
# For csc_matrix
- csc0 = csc /100.0
+ csc0 = csc / 100.0
csc1 = 0.2 + csc0
assert_array_almost_equal(csc0.evaluate(), np.array([[0.01, 0., 0.04],
[0., 0., 0.05], [0.02, 0.03, 0.06]]))
- assert_array_almost_equal(csc0.evaluate(), np.array([[0.21, 0.2,
0.24], [0.2, 0.2, 0.25], [0.22, 0.23, 0.26]]))
+ assert_array_almost_equal(csc1.evaluate(), np.array([[0.21, 0.2,
0.24], [0.2, 0.2, 0.25], [0.22, 0.23, 0.26]]))
# For csr_matrix
- csr0 = csr /100.0
+ csr0 = csr / 100.0
csr1 = 0.2 + csr0
assert_array_almost_equal(csc0.evaluate(), np.array([[0.01, 0., 0.04],
[0., 0., 0.05], [0.02, 0.03, 0.06]]))
- assert_array_almost_equal(csc0.evaluate(), np.array([[0.21, 0.2,
0.24], [0.2, 0.2, 0.25], [0.22, 0.23, 0.26]]))
+ assert_array_almost_equal(csc1.evaluate(), np.array([[0.21, 0.2,
0.24], [0.2, 0.2, 0.25], [0.22, 0.23, 0.26]]))
# For dia_matrix
- dia0 = dia /100.0
+ dia0 = dia / 100.0
dia1 = 0.2 + dia0
- assert_array_almost_equal(dia0.evaluate(), np.array([[0.01, 0.02,
0.03, 0.04]]))
- assert_array_almost_equal(dia1.evaluate(), np.array([[0.21, 0.22,
0.23, 0.24]]))
- # For dok_matrix
- dok0 = dok /100.0
+ assert_array_almost_equal(
+ dia0.evaluate(),
+ np.array([
+ [0.01, 0, 0.03, 0],
+ [0.01, 0.02, 0, 0.04],
+ [0, 0.02, 0.03, 0],
+ [0, 0, 0.03, 0.04]
+ ])
+ )
+ assert_array_almost_equal(
+ dia1.evaluate(),
+ np.array([
+ [0.21, 0.2, 0.23, 0.2],
+ [0.21, 0.22, 0.2, 0.24],
+ [0.2, 0.22, 0.23, 0.2],
+ [0.2, 0.2, 0.23, 0.24]
+ ])
+ ) # For dok_matrix
+ dok0 = dok / 100.0
dok1 = 0.2 + dok0
assert_array_almost_equal(dok0.evaluate(), np.array([[0., 0.02, 0.02,
0., 0.01, 0.02], [0., 0., 0.01, 0.02, 0.02, 0.02]]))
assert_array_almost_equal(dok1.evaluate(), np.array([[0.2, 0.22, 0.22,
0.2, 0.21, 0.22], [0.2, 0.2, 0.21, 0.22, 0.22, 0.22]]))
# For lil_matrix
- lil0 = lil /100.0
+ lil0 = lil / 100.0
lil1 = 0.2 + lil0
assert_array_almost_equal(lil0.evaluate(), np.array([[0.01, 0.02,
0.03, 0.04, 0.05, 0.06]]))
assert_array_almost_equal(lil1.evaluate(), np.array([[0.21, 0.22,
0.23, 0.24, 0.25, 0.26]]))
-
+ test_multiple_operations_with_sparse_array()
def test_getitem_from_2D_sparse_array():
pytest.raises(IndexError, bsr.__getitem__, (3, 0))
@@ -186,41 +202,7 @@
pytest.raises(IndexError, dia.__getitem__, (3, 0))
pytest.raises(IndexError, dok.__getitem__, (3, 0))
pytest.raises(IndexError, lil.__getitem__, (3, 0))
-
-
-# def test_columnwise_iteration_with_flat_array():
-# m = larray(5, shape=(4,3)) # 4 rows, 3 columns
-# cols = [col for col in m.by_column()]
-# assert cols == [5, 5, 5]
-#
-# def test_columnwise_iteration_with_structured_array():
-# input = np.arange(12).reshape((4,3))
-# m = larray(input, shape=(4,3)) # 4 rows, 3 columns
-# cols = [col for col in m.by_column()]
-# assert_array_equal(cols[0], input[:,0])
-# assert_array_equal(cols[2], input[:,2])
-#
-# def test_columnwise_iteration_with_function():
-# input = lambda i,j: 2*i + j
-# m = larray(input, shape=(4,3))
-# cols = [col for col in m.by_column()]
-# assert_array_equal(cols[0], np.array([0, 2, 4, 6]))
-# assert_array_equal(cols[1], np.array([1, 3, 5, 7]))
-# assert_array_equal(cols[2], np.array([2, 4, 6, 8]))
-#
-# def test_columnwise_iteration_with_flat_array_and_mask():
-# m = larray(5, shape=(4,3)) # 4 rows, 3 columns
-# mask = np.array([True, False, True])
-# cols = [col for col in m.by_column(mask=mask)]
-# assert cols == [5, 5]
-#
-# def test_columnwise_iteration_with_structured_array_and_mask():
-# input = np.arange(12).reshape((4,3))
-# m = larray(input, shape=(4,3)) # 4 rows, 3 columns
-# mask = np.array([False, True, True])
-# cols = [col for col in m.by_column(mask=mask)]
-# assert_array_equal(cols[0], input[:,1])
-# assert_array_equal(cols[1], input[:,2])
+ # test_getitem_from_2D_sparse_array()
def test_size_related_properties():