MCPcopy Create free account
hub / github.com/numpy/numpy / like_function

Function like_function

numpy/matrixlib/tests/test_interaction.py:115–123  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

113
114
115def like_function():
116 # 2018-04-29: moved here from core.tests.test_numeric
117 a = np.matrix([[1, 2], [3, 4]])
118 for like_function in np.zeros_like, np.ones_like, np.empty_like:
119 b = like_function(a)
120 assert_(type(b) is np.matrix)
121
122 c = like_function(a, subok=False)
123 assert_(type(c) is not np.matrix)
124
125
126def test_array_astype():

Callers 1

check_like_functionMethod · 0.85

Calls 1

assert_Function · 0.90

Tested by

no test coverage detected