mirror of
https://github.com/wassname/simpeg.git
synced 2026-09-10 12:37:30 +08:00
give Zero a transpose
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import unittest
|
||||
from SimPEG.Utils import Zero, Identity, sdiag
|
||||
from SimPEG.Utils import Zero, Identity, sdiag, mkvc
|
||||
from SimPEG import np, sp
|
||||
|
||||
class Tests(unittest.TestCase):
|
||||
@@ -29,6 +29,11 @@ class Tests(unittest.TestCase):
|
||||
assert a == 1
|
||||
self.assertRaises(ZeroDivisionError, lambda:3/z)
|
||||
|
||||
assert mkvc(z) == 0
|
||||
assert sdiag(z)*a == 0
|
||||
assert z.T == 0
|
||||
assert z.transpose == 0
|
||||
|
||||
def test_mat_zero(self):
|
||||
z = Zero()
|
||||
S = sdiag(np.r_[2,3])
|
||||
|
||||
Reference in New Issue
Block a user