Skip to content

Conversation

@pletelli
Copy link

will soon fix #5481 which has been opened to fix tests on #4807

This PR is based on #4807

@pletelli pletelli force-pushed the fix_read_only_mmap_tests branch from 47bea48 to 0d4ef7e Compare October 21, 2015 10:14
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The class is numpy.ndarray, never numpy.array.

@amueller
Copy link
Member

Also see #4807 ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this appears not to be the right place to raise that error.
check_array() can be called in both fit() and transform() as in RobustScaler for example.

The returned array is modified inplace in transform() but no modification is ever performed in fit().

Could we make this check at the beginning of each transform() method ? WDYT @ogrisel
This may be in the mother class's method fit_transform() and used calling super()

@pletelli pletelli force-pushed the fix_read_only_mmap_tests branch 6 times, most recently from 06ba2a8 to 5bfb9f7 Compare October 21, 2015 15:57
@pletelli pletelli force-pushed the fix_read_only_mmap_tests branch from 5bfb9f7 to d291d89 Compare October 21, 2015 15:58
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should maybe factored into check_array:
Parameters copy=False|True|'on_readonly'

@arthurmensch
Copy link
Contributor

@pletelli are you still willing to work on this or should I take up ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Estimators should not try to modify X and y inplace in order to handle readonly memory maps

5 participants