-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
Raising ValueError when xlim and ylim contain non-int and non-float dtype elements #40889 #43932
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
regmibijay
commented
Oct 8, 2021
- closes BUG: xlim and ylim not restricting plot area #40781
- tests added / passed
- Ensure all linting tests pass, see here for how to run them
- whatsnew entry
@github-actions pre-commit |
# GH40781 | ||
if ( | ||
all([is_datetime64_any_dtype(lim) for lim in list_iterable]) | ||
or np.issubdtype(np.array(list_iterable).dtype, np.int) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use is_integer, is_float (the pandas routines)
if not self._has_valid_lim_dtype(self.ylim): | ||
raise ValueError( | ||
"`ylim` contains values" | ||
" which are not of float, int or numpy.datetime64 dtype" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we saying np.datetime64, we use the pandas types (and they are converted), so this is extra confusing.
from pandas import DataFrame | ||
|
||
pytestmark = pytest.mark.slow | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of making a new file, find an appropriate one which has simliar tests.
This pull request is stale because it has been open for thirty days with no activity. Please update or respond to this comment if you're still interested in working on this. |
pls merge master and update to comments |
can you merge master i think there are some comments as well |
Sorry for not updating this pr for a while, while I have worked on other issues, I have been strugglig with a proper place to move my tests to. I just cant wrap my head around where the perfect spot would be. I would be very thankful for some tips. Other changes will be merged accordingly. |
needs to be passing and pls merge master |
grepping for .plot.line i see several in tests.plotting.frame.test_frame, that would be a good place to start |
Thanks for the PR but appears to have gone stale. If interested in continuing, please merge the main branch and address the review and we can reopen. |