import string
import numpy as np
+from numpy.testing import assert_array_almost_equal_nulp
import pytest
from pandas.compat import is_platform_linux
# no subplots
df = DataFrame({"A": [3] * 5, "B": list(range(1, 6))}, index=range(5))
ax = df.plot.bar(grid=True, log=True)
- tm.assert_numpy_array_equal(ax.yaxis.get_ticklocs(), expected)
+ assert_array_almost_equal_nulp(ax.yaxis.get_ticklocs(), expected, 4)
@pytest.mark.xfail(
np_version_gte1p24 and is_platform_linux(),
log=True, subplots=True
)
- tm.assert_numpy_array_equal(ax[0].yaxis.get_ticklocs(), expected)
- tm.assert_numpy_array_equal(ax[1].yaxis.get_ticklocs(), expected)
+ assert_array_almost_equal_nulp(ax[0].yaxis.get_ticklocs(), expected, 4)
+ assert_array_almost_equal_nulp(ax[1].yaxis.get_ticklocs(), expected, 4)
def test_boxplot_subplots_return_type_default(self, hist_df):
df = hist_df