[Scipy-svn] r3690 - trunk/scipy/sparse
scipy-svn at scipy.org
scipy-svn at scipy.org
Thu Dec 20 04:16:32 EST 2007
Author: wnbell
Date: 2007-12-20 03:16:26 -0600 (Thu, 20 Dec 2007)
New Revision: 3690
Modified:
trunk/scipy/sparse/base.py
Log:
warn for ** elementwise multiply
Modified: trunk/scipy/sparse/base.py
===================================================================
--- trunk/scipy/sparse/base.py 2007-12-19 17:37:30 UTC (rev 3689)
+++ trunk/scipy/sparse/base.py 2007-12-20 09:16:26 UTC (rev 3690)
@@ -269,6 +269,10 @@
return result
elif isscalarlike(other):
raise ValueError,'exponent must be an integer'
+ elif isspmatrix(other):
+ warn('Using ** for elementwise multiplication is deprecated.'\
+ 'Use .multiply() instead',DeprecationWarning)
+ return self.multiply(other)
else:
raise NotImplementedError
@@ -402,7 +406,7 @@
def todia(self):
return self.tocoo().todia()
-
+
def copy(self):
return self.__class__(self,copy=True)
More information about the Scipy-svn
mailing list