Example #1
0
    def testSparseMaximum(self):
        s1 = SparseNDArray(self.s1)
        s2 = SparseNDArray(self.s2)

        np.testing.assert_array_equal(
            s1.maximum(s2).toarray(),
            self.s1.maximum(self.s2).toarray())
Example #2
0
def test_sparse_maximum():
    s1 = SparseNDArray(s1_data)
    s2 = SparseNDArray(s2_data)

    np.testing.assert_array_equal(
        s1.maximum(s2).toarray(),
        s1.maximum(s2).toarray())

    v = SparseVector(v1, shape=(3, ))
    np.testing.assert_array_equal(v.maximum(d1), np.maximum(v1_data, d1))
Example #3
0
    def testSparseMaximum(self):
        s1 = SparseNDArray(self.s1)
        s2 = SparseNDArray(self.s2)

        np.testing.assert_array_equal(
            s1.maximum(s2).toarray(),
            self.s1.maximum(self.s2).toarray())

        v1 = SparseVector(self.v1, shape=(3, ))
        np.testing.assert_array_equal(v1.maximum(self.d1),
                                      np.maximum(self.v1_data, self.d1))