Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5821d10

Browse filesBrowse files
Apply ruff/pandas-vet rule PD011
PD011 Use `.to_numpy()` instead of `.values`
1 parent d936ca0 commit 5821d10
Copy full SHA for 5821d10

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎doc/source/reference/random/performance.py

Copy file name to clipboardExpand all lines: doc/source/reference/random/performance.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
print(table.to_csv(float_format='%0.1f'))
6464

6565

66-
rel = table.loc[:, ['RandomState']].values @ np.ones(
66+
rel = table.loc[:, ['RandomState']].to_numpy() @ np.ones(
6767
(1, table.shape[1])) / table
6868
rel.pop('RandomState')
6969
rel = rel.T
@@ -77,7 +77,7 @@
7777
rows = ['32-bit Unsigned Ints', '64-bit Unsigned Ints', 'Uniforms',
7878
'Normals', 'Exponentials']
7979
xplat = rel.reindex(rows, axis=0)
80-
xplat = 100 * (xplat / xplat.MT19937.values[:, None])
80+
xplat = 100 * (xplat / xplat.MT19937.to_numpy()[:, None])
8181
overall = np.exp(np.log(xplat).mean(0))
8282
xplat = xplat.T.copy()
8383
xplat['Overall'] = overall

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.