Skip to content

Commit 65b2936

Browse files
authored
Set np printoptions (#32539)
1 parent 878ccce commit 65b2936

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sdks/python/apache_beam/dataframe/doctests.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,10 @@ def set_pandas_options():
665665
# See
666666
# https://github.com/pandas-dev/pandas/blob/a00202d12d399662b8045a8dd3fdac04f18e1e55/doc/source/conf.py#L319
667667
np.random.seed(123456)
668-
np.set_printoptions(precision=4, suppress=True)
668+
legacy = None
669+
if np.version.version.startswith('2'):
670+
legacy = '1.25'
671+
np.set_printoptions(precision=4, suppress=True, legacy=legacy)
669672
pd.options.display.max_rows = 15
670673

671674

0 commit comments

Comments
 (0)