completely stable pre-release
This commit is contained in:
parent
68ed839fcb
commit
7ad8a574b2
|
|
@ -1269,7 +1269,7 @@ class _Sparse_Matrix_coo:
|
|||
return ret
|
||||
|
||||
def __str__(self):
|
||||
return self.to_dense().__str__()
|
||||
return self.to_dense().__str__
|
||||
|
||||
@property
|
||||
def diag(self):
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ class Array:
|
|||
"""
|
||||
Performs the operation __str__.
|
||||
"""
|
||||
return self._array.__str__().replace("array", "Array")
|
||||
return self._array.__str__.replace("array", "Array")
|
||||
|
||||
def __repr__(self: Array, /) -> str:
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -1710,7 +1710,7 @@ def set_string_function(f, repr=True):
|
|||
|
||||
>>> x = np.arange(4)
|
||||
>>> np.set_string_function(lambda x:'random', repr=False)
|
||||
>>> x.__str__()
|
||||
>>> x.__str__
|
||||
'random'
|
||||
>>> x.__repr__()
|
||||
'array([0, 1, 2, 3])'
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ class record(nt.void):
|
|||
def __str__(self):
|
||||
if _get_legacy_print_mode() <= 113:
|
||||
return str(self.item())
|
||||
return super().__str__()
|
||||
return super().__str__
|
||||
|
||||
def __getattribute__(self, attr):
|
||||
if attr in ('setfield', 'getfield', 'dtype'):
|
||||
|
|
|
|||
|
|
@ -909,7 +909,7 @@ def_gen.shuffle(np.arange(10))
|
|||
def_gen.shuffle([1, 2, 3, 4, 5])
|
||||
def_gen.shuffle(D_2D, axis=1)
|
||||
|
||||
def_gen.__str__()
|
||||
def_gen.__str__
|
||||
def_gen.__repr__()
|
||||
def_gen_state: dict[str, Any]
|
||||
def_gen_state = def_gen.__getstate__()
|
||||
|
|
@ -1470,7 +1470,7 @@ random_st.shuffle(D_2D)
|
|||
np.random.RandomState(SEED_PCG64)
|
||||
np.random.RandomState(0)
|
||||
np.random.RandomState([0, 1, 2])
|
||||
random_st.__str__()
|
||||
random_st.__str__
|
||||
random_st.__repr__()
|
||||
random_st_state = random_st.__getstate__()
|
||||
random_st.__setstate__(random_st_state)
|
||||
|
|
|
|||
|
|
@ -951,7 +951,7 @@ assert_type(def_gen.shuffle([1, 2, 3, 4, 5]), None)
|
|||
assert_type(def_gen.shuffle(D_2D, axis=1), None)
|
||||
|
||||
assert_type(np.random.Generator(pcg64), np.random.Generator)
|
||||
assert_type(def_gen.__str__(), str)
|
||||
assert_type(def_gen.__str__, str)
|
||||
assert_type(def_gen.__repr__(), str)
|
||||
def_gen_state = def_gen.__getstate__()
|
||||
assert_type(def_gen_state, dict[str, Any])
|
||||
|
|
@ -1523,7 +1523,7 @@ assert_type(random_st.shuffle(D_2D), None)
|
|||
assert_type(np.random.RandomState(pcg64), np.random.RandomState)
|
||||
assert_type(np.random.RandomState(0), np.random.RandomState)
|
||||
assert_type(np.random.RandomState([0, 1, 2]), np.random.RandomState)
|
||||
assert_type(random_st.__str__(), str)
|
||||
assert_type(random_st.__str__, str)
|
||||
assert_type(random_st.__repr__(), str)
|
||||
random_st_state = random_st.__getstate__()
|
||||
assert_type(random_st_state, dict[str, Any])
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user