Home
last modified time | relevance | path

Searched refs:toarray (Results 1 – 25 of 401) sorted by relevance

12345678910>>...17

/dports/math/py-Pyomo/Pyomo-6.1.2/pyomo/contrib/pynumero/sparse/tests/
H A Dtest_block_matrix.py164 self.assertTrue(np.allclose(flat_prod.toarray(), prod.toarray()))
173 self.assertTrue(np.allclose(flat_prod.toarray(), prod.toarray()))
308 dense_res = A_block.toarray() + A_block.toarray()
313 dense_res = A_block.toarray() + A_block.toarray()
318 dense_res = A_block.toarray() + 2 * A_block.toarray()
323 dense_res = 2 * A_block.toarray() + A_block.toarray()
328 dense_res = A_block.toarray().T + A_block.toarray()
370 self.assertTrue(np.allclose(A_block.toarray(), mm.toarray()))
373 self.assertTrue(np.allclose(A_block.toarray(), mm.toarray()))
376 dense_r = A_block2.toarray().T - A_block.toarray()
[all …]
H A Dtest_mpi_block_matrix.py156 self.square_mpi_mat.toarray()
195 self.assertTrue((m == bm.get_block(0, 1)).toarray().all())
296 self.assertTrue(np.allclose(res.get_block(i, j).toarray().T,
297 mat1.get_block(j, i).toarray()))
430 self.assertTrue(np.allclose(res.get_block(i, j).toarray(),
461 self.assertTrue(np.allclose(bm.get_block(i, j).toarray(),
494 self.assertTrue(np.allclose(bm.get_block(i, j).toarray(),
527 self.assertTrue(np.allclose(bm.get_block(i, j).toarray(),
556 self.assertTrue(np.allclose(bm.get_block(i, j).toarray(),
585 self.assertTrue(np.allclose(res.get_block(i, j).toarray(),
[all …]
/dports/math/py-cvxpy/cvxpy-1.1.17/cvxpy/tests/
H A Dtest_grad.py52 self.assertItemsAlmostEqual(expr.grad[self.A].toarray(),
93 self.assertItemsAlmostEqual(expr.grad[self.A].toarray(),
98 self.assertItemsAlmostEqual(expr.grad[self.A].toarray(),
113 self.assertItemsAlmostEqual(expr.grad[self.A].toarray(),
119 self.assertItemsAlmostEqual(expr.grad[self.A].toarray(),
209 self.assertItemsAlmostEqual(expr.grad[K].toarray(), val)
273 self.assertItemsAlmostEqual(expr.grad[self.A].toarray(),
278 self.assertItemsAlmostEqual(expr.grad[self.A].toarray(),
544 self.assertItemsAlmostEqual(expr.grad[y].toarray(), val)
588 self.assertItemsAlmostEqual(expr.grad[y].toarray(), val)
[all …]
/dports/science/py-scikit-learn/scikit-learn-1.0.2/sklearn/utils/tests/
H A Dtest_sparsefuncs.py601 assert_array_almost_equal(Xr.toarray(), Xc.toarray())
615 assert_array_almost_equal(Xr.toarray(), Xc.toarray())
633 assert_array_almost_equal(Xr.toarray(), Xc.toarray())
666 assert_array_equal(X_csr.toarray(), X_csc.toarray())
673 assert_array_equal(X_csr.toarray(), X_csc.toarray())
689 assert_array_equal(X_csr.toarray(), X_csc.toarray())
695 assert_array_equal(X_csr.toarray(), X_csc.toarray())
714 assert_array_equal(X_csr.toarray(), X_csc.toarray())
721 assert_array_equal(X_csr.toarray(), X_csc.toarray())
737 assert_array_equal(X_csr.toarray(), X_csc.toarray())
[all …]
/dports/devel/py-qutip/qutip-4.6.2/qutip/tests/
H A Dtest_sparse.py71 x = sp_permute(A.data, perm, perm).toarray()
76 y = sp_permute(B, perm, perm).toarray()
86 x = sp_permute(A.data, rperm, cperm).toarray()
91 y = sp_permute(B, rperm, cperm).toarray()
102 assert_equal((A.full() - B.toarray()).all(), 0)
108 assert_equal((A.full() - B.toarray()).all(), 0)
119 assert_equal((A.full() - B.toarray()).all(), 0)
161 A = A.toarray()
169 A = A.toarray()
180 B = A.toarray()
[all …]
H A Dtest_mkl.py82 M = sM.toarray()
87 N = sN.toarray()
102 M = sM.toarray()
107 N = sN.toarray()
122 M = sM.toarray()
128 N = sN.toarray()
150 M = sM.toarray()
156 N = sN.toarray()
206 assert_array_almost_equal(x.toarray(), ans)
/dports/science/py-scikit-learn/scikit-learn-1.0.2/sklearn/datasets/tests/
H A Dtest_svmlight_format.py102 assert_array_equal(X_train.toarray(), X_test.toarray())
146 assert_array_almost_equal(X.toarray(), Xgz.toarray())
158 assert_array_almost_equal(X.toarray(), Xbz.toarray())
250 X_dense = X_sparse.toarray()
297 X2_dense = X2.toarray()
364 X = X.toarray()
411 X = X.toarray()
442 assert_array_equal(X.toarray(), true_X)
469 assert_array_almost_equal(X.toarray(), true_X.toarray())
508 assert_array_almost_equal(X.toarray(), X_concat.toarray())
[all …]
/dports/science/py-scikit-learn/scikit-learn-1.0.2/sklearn/svm/tests/
H A Dtest_sparse.py49 dense_svm.fit(X_train.toarray(), y_train)
51 X_test_dense = X_test.toarray()
58 dense_svm.support_vectors_, sparse_svm.support_vectors_.toarray()
137 assert_array_almost_equal(coef_dense, coef_sorted.toarray())
160 assert_array_almost_equal(coef_unsorted.toarray(), coef_sorted.toarray())
180 clf = svm.SVC(kernel=k).fit(iris.data.toarray(), iris.target)
183 clf.support_vectors_, sp_clf.support_vectors_.toarray()
269 clf.predict(iris.data.toarray()), sp_clf.predict(iris.data)
274 assert_array_almost_equal(pred, clf.predict(iris.data.toarray()))
516 clf = svm.SVC(kernel="linear").fit(X.toarray(), y)
[all …]
/dports/science/py-scipy/scipy-1.7.1/scipy/sparse/tests/
H A Dtest_extract.py30 assert_equal(A.toarray(), csr_matrix(((I,J),V), shape=A.shape))
34 B = A.toarray()
36 assert_equal(extract.tril(A,k=k).toarray(), np.tril(B,k=k))
40 B = A.toarray()
42 assert_equal(extract.triu(A,k=k).toarray(), np.triu(B,k=k))
H A Dtest_matrix_io.py32 assert_equal(loaded_matrix.toarray(), dense_matrix)
76 assert_equal(a.toarray(), c.toarray())
77 assert_equal(b.toarray(), c.toarray())
/dports/textproc/py-petl/petl-1.7.4/petl/test/io/
H A Dtest_numpy.py10 from petl.io.numpy import toarray, fromarray, torecarray
25 a = toarray(t)
45 a = toarray(t)
85 a = toarray(t, dtype='U4, i2, f4')
105 a = toarray(t, dtype={'foo': 'U4'}) # specify partial dtype
125 a = toarray(t, dtype=[('A', 'U4'), ('B', 'i2'), ('C', 'f4')])
145 a = toarray(t)
154 a = t.toarray()
/dports/science/py-cirq-aqt/Cirq-0.12.0/cirq-core/cirq/ops/
H A Dprojector_test.py14 np.testing.assert_allclose(zero_projector.matrix().toarray(), [[1.0, 0.0], [0.0, 0.0]])
15 np.testing.assert_allclose(one_projector.matrix().toarray(), [[0.0, 0.0], [0.0, 1.0]])
17 coeff_projector.matrix().toarray(), [[1.23 + 4.56j, 0.0], [0.0, 0.0]]
34 np.testing.assert_allclose(zero_projector.matrix().toarray(), [[1.0, 0.0], [0.0, 0.0]])
42 np.testing.assert_allclose(proj.matrix().toarray(), np.diag([1.0, 0.0]))
43 np.testing.assert_allclose(proj.matrix([q0]).toarray(), np.diag([1.0, 0.0]))
44 np.testing.assert_allclose(proj.matrix([q1]).toarray(), np.diag([1.0, 1.0]))
46 np.testing.assert_allclose(proj.matrix([q0, q1]).toarray(), np.diag([1.0, 1.0, 0.0, 0.0]))
47 np.testing.assert_allclose(proj.matrix([q1, q0]).toarray(), np.diag([1.0, 0.0, 1.0, 0.0]))
50 proj_with_coefficient.matrix([q1, q0]).toarray(),
/dports/science/py-cirq-core/Cirq-0.13.1/cirq-core/cirq/ops/
H A Dprojector_test.py14 np.testing.assert_allclose(zero_projector.matrix().toarray(), [[1.0, 0.0], [0.0, 0.0]])
15 np.testing.assert_allclose(one_projector.matrix().toarray(), [[0.0, 0.0], [0.0, 1.0]])
17 coeff_projector.matrix().toarray(), [[1.23 + 4.56j, 0.0], [0.0, 0.0]]
34 np.testing.assert_allclose(zero_projector.matrix().toarray(), [[1.0, 0.0], [0.0, 0.0]])
42 np.testing.assert_allclose(proj.matrix().toarray(), np.diag([1.0, 0.0]))
43 np.testing.assert_allclose(proj.matrix([q0]).toarray(), np.diag([1.0, 0.0]))
44 np.testing.assert_allclose(proj.matrix([q1]).toarray(), np.diag([1.0, 1.0]))
46 np.testing.assert_allclose(proj.matrix([q0, q1]).toarray(), np.diag([1.0, 1.0, 0.0, 0.0]))
47 np.testing.assert_allclose(proj.matrix([q1, q0]).toarray(), np.diag([1.0, 0.0, 1.0, 0.0]))
50 proj_with_coefficient.matrix([q1, q0]).toarray(),
/dports/science/py-cirq-pasqal/Cirq-0.13.1/cirq-core/cirq/ops/
H A Dprojector_test.py14 np.testing.assert_allclose(zero_projector.matrix().toarray(), [[1.0, 0.0], [0.0, 0.0]])
15 np.testing.assert_allclose(one_projector.matrix().toarray(), [[0.0, 0.0], [0.0, 1.0]])
17 coeff_projector.matrix().toarray(), [[1.23 + 4.56j, 0.0], [0.0, 0.0]]
34 np.testing.assert_allclose(zero_projector.matrix().toarray(), [[1.0, 0.0], [0.0, 0.0]])
42 np.testing.assert_allclose(proj.matrix().toarray(), np.diag([1.0, 0.0]))
43 np.testing.assert_allclose(proj.matrix([q0]).toarray(), np.diag([1.0, 0.0]))
44 np.testing.assert_allclose(proj.matrix([q1]).toarray(), np.diag([1.0, 1.0]))
46 np.testing.assert_allclose(proj.matrix([q0, q1]).toarray(), np.diag([1.0, 1.0, 0.0, 0.0]))
47 np.testing.assert_allclose(proj.matrix([q1, q0]).toarray(), np.diag([1.0, 0.0, 1.0, 0.0]))
50 proj_with_coefficient.matrix([q1, q0]).toarray(),
/dports/science/py-cirq-google/Cirq-0.13.0/cirq-core/cirq/ops/
H A Dprojector_test.py14 np.testing.assert_allclose(zero_projector.matrix().toarray(), [[1.0, 0.0], [0.0, 0.0]])
15 np.testing.assert_allclose(one_projector.matrix().toarray(), [[0.0, 0.0], [0.0, 1.0]])
17 coeff_projector.matrix().toarray(), [[1.23 + 4.56j, 0.0], [0.0, 0.0]]
34 np.testing.assert_allclose(zero_projector.matrix().toarray(), [[1.0, 0.0], [0.0, 0.0]])
42 np.testing.assert_allclose(proj.matrix().toarray(), np.diag([1.0, 0.0]))
43 np.testing.assert_allclose(proj.matrix([q0]).toarray(), np.diag([1.0, 0.0]))
44 np.testing.assert_allclose(proj.matrix([q1]).toarray(), np.diag([1.0, 1.0]))
46 np.testing.assert_allclose(proj.matrix([q0, q1]).toarray(), np.diag([1.0, 1.0, 0.0, 0.0]))
47 np.testing.assert_allclose(proj.matrix([q1, q0]).toarray(), np.diag([1.0, 0.0, 1.0, 0.0]))
50 proj_with_coefficient.matrix([q1, q0]).toarray(),
/dports/science/py-cirq-ionq/Cirq-0.13.1/cirq-core/cirq/ops/
H A Dprojector_test.py14 np.testing.assert_allclose(zero_projector.matrix().toarray(), [[1.0, 0.0], [0.0, 0.0]])
15 np.testing.assert_allclose(one_projector.matrix().toarray(), [[0.0, 0.0], [0.0, 1.0]])
17 coeff_projector.matrix().toarray(), [[1.23 + 4.56j, 0.0], [0.0, 0.0]]
34 np.testing.assert_allclose(zero_projector.matrix().toarray(), [[1.0, 0.0], [0.0, 0.0]])
42 np.testing.assert_allclose(proj.matrix().toarray(), np.diag([1.0, 0.0]))
43 np.testing.assert_allclose(proj.matrix([q0]).toarray(), np.diag([1.0, 0.0]))
44 np.testing.assert_allclose(proj.matrix([q1]).toarray(), np.diag([1.0, 1.0]))
46 np.testing.assert_allclose(proj.matrix([q0, q1]).toarray(), np.diag([1.0, 1.0, 0.0, 0.0]))
47 np.testing.assert_allclose(proj.matrix([q1, q0]).toarray(), np.diag([1.0, 0.0, 1.0, 0.0]))
50 proj_with_coefficient.matrix([q1, q0]).toarray(),
/dports/www/webtrees/webtrees-1.7.18/webtrees/
H A Dmessage.php146 $toarray = array($to); variable
148 $toarray = array(); variable
150 $toarray[$user->getUserId()] = $user->getUserName();
154 $toarray = array(); variable
157 $toarray[$user->getUserId()] = $user->getUserName();
162 $toarray = array(); variable
166 $toarray[$user->getUserId()] = $user->getUserName();
169 $toarray[$user->getUserId()] = $user->getUserName();
174 foreach ($toarray as $indexval => $to) {
/dports/textproc/kibana7/kibana-7.16.2-darwin-x86_64/node_modules/lodash.toarray/
H A DREADME.md1 # lodash.toarray v4.4.0
10 $ npm i --save lodash.toarray
15 var toArray = require('lodash.toarray');
18 … source](https://github.com/lodash/lodash/blob/4.4.0-npm-packages/lodash.toarray) for more details.
/dports/textproc/opensearch-dashboards/opensearch-dashboards-1.2.0-linux-x64/node_modules/lodash.toarray/
H A DREADME.md1 # lodash.toarray v4.4.0
10 $ npm i --save lodash.toarray
15 var toArray = require('lodash.toarray');
18 … source](https://github.com/lodash/lodash/blob/4.4.0-npm-packages/lodash.toarray) for more details.
/dports/science/py-scipy/scipy-1.7.1/scipy/sparse/csgraph/tests/
H A Dtest_flow.py54 assert_array_equal(res.residual.toarray(), expected_residual)
64 assert_array_equal(res.residual.toarray(), expected_residual)
90 assert_array_equal(res.residual.toarray(), expected_residual)
111 assert_array_equal(res.residual.toarray(), expected_residual)
124 assert_array_equal(res.residual.toarray(), expected_residual)
/dports/science/py-libpysal/libpysal-4.5.1/libpysal/weights/tests/
H A Dtest_adjlist.py29 w_from_adj.sparse.toarray(), self.knownW.sparse.toarray()
38 np.testing.assert_allclose(badgrid.sparse.toarray(), grid.sparse.toarray())
47 np.testing.assert_allclose(badgrid.sparse.toarray(), grid.sparse.toarray())
73 flat_diffs = allpairs[W.sparse.toarray().astype(bool)]
H A Dtest_nx.py21 np.testing.assert_allclose(W_.sparse.toarray(), self.known_amat)
26 self.known_W.sparse.toarray(), nx.to_numpy_matrix(nxsquare)
30 self.known_W.sparse.toarray(), W_square.sparse.toarray()
/dports/www/phpgroupware/phpgroupware-0.9.16.017/tts/inc/
H A Dfunctions.inc.php119 $toarray = Array();
129 $toarray[$prefs['email']['address']] = $prefs['email']['address'];
133 if(count($toarray) > 1)
135 $to = implode(',',$toarray);
139 $to = current($toarray);
/dports/math/py-Pyomo/Pyomo-6.1.2/pyomo/contrib/pynumero/examples/
H A Dnlp_interface.py50 print("Jacobian of Constraints:\n", jac.toarray())
52 print("Jacobian of Equality Constraints:\n", jac_eq.toarray())
54 print("Jacobian of Inequality Constraints:\n", jac_ineq.toarray())
56 print("Hessian of Lagrangian\n", hess_lag.toarray())
/dports/science/py-scikit-learn/scikit-learn-1.0.2/sklearn/decomposition/tests/
H A Dtest_truncated_svd.py27 X = X_sparse if kind == "sparse" else X_sparse.toarray()
62 Xfmt = X_sparse.toarray() if fmt == "dense" else getattr(X_sparse, "to" + fmt)()
77 assert_allclose(Xinv, X_sparse.toarray(), rtol=1e-1, atol=2e-1)
92 X = X_sparse if kind == "sparse" else X_sparse.toarray()
102 total_variance = np.var(X_sparse.toarray(), axis=0).sum()
115 X = X_sparse if kind == "sparse" else X_sparse.toarray()
179 X_dense = X_sparse.toarray()
202 X = X_sparse if kind == "sparse" else X_sparse.toarray()

12345678910>>...17