Skip to content
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

[FIX] Ensure unlockable sparse arrays after Table.copy #5807

Merged
merged 1 commit into from
Feb 3, 2022

Conversation

markotoplak
Copy link
Member

Issue

Fixes #5746

Includes
  • Code changes
  • Tests
  • Documentation

@codecov
Copy link

codecov bot commented Jan 26, 2022

Codecov Report

Merging #5807 (2b0cd0c) into master (172b33d) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #5807      +/-   ##
==========================================
- Coverage   86.14%   86.14%   -0.01%     
==========================================
  Files         316      316              
  Lines       66417    66419       +2     
==========================================
- Hits        57217    57215       -2     
- Misses       9200     9204       +4     

@PrimozGodec
Copy link
Contributor

PrimozGodec commented Feb 3, 2022

Tests are fixed in #5822

So if I understand correct @markotoplak:

from Orange.data import Table

Table.LOCKING = True
data = Table("zoo")
data = data.to_sparse()
with data.unlocked():  <-- this should still fail since to_sparse use transform and data can be a view
    pass

with data.copy().unlocked():  <-- this does not fail anymore
    pass

@markotoplak
Copy link
Member Author

@PrimozGodec, yes, you are correct.

@PrimozGodec PrimozGodec merged commit 55d77e0 into biolab:master Feb 3, 2022
@markotoplak markotoplak deleted the fix-sparse-copy branch February 28, 2022 11:53
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.

Table: copy does not guarantee unlock to suceed
2 participants