-
-
Notifications
You must be signed in to change notification settings - Fork 11.1k
ENH: Add shape to *_like() array creation #13046
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
Changes from 1 commit
f885c08
5ad61b6
fd3e270
b7202a7
013cbce
807f512
95bbfd0
43b9828
fa7fd75
d57e6d3
f1b3e91
d24ac10
ec26417
40e7e9e
928952d
e394356
d938fb9
99a55e0
c087801
db7614b
669ea71
f53afbe
c3ac08e
695b836
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2239,8 +2239,7 @@ def check_like_function(self, like_function, value, fill_value=False): | |
assert_(sz.flags.f_contiguous) | ||
self.compare_array_value(sz, value, fill_value) | ||
|
||
if (d.ndim != len(s) or | ||
not (d.flags.c_contiguous or d.flags.f_contiguous)): | ||
if (d.ndim != len(s)): | ||
assert_raises(ValueError, like_function, d, dtype=dtype, | ||
shape=s, order='K', **fill_kwarg) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Needs an There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just added this condition. Note we have also to check for non-C/F-layouts while raising an exception. |
||
else: | ||
|
Uh oh!
There was an error while loading. Please reload this page.