[MRG] Fix UnbalancedSinkhornTransport transform failing on nx.array_equal (closes #650) - #837
Merged
rflamary merged 6 commits intoAug 27, 2026
Conversation
…loses PythonOT#650) fit() now initializes the backend attribute nx before the check_params gate, matching the behavior of BaseTransport.fit. Previously, a fit call with missing parameters left self.nx as None, causing any subsequent transform() call to crash with: AttributeError: 'NoneType' object has no attribute 'array_equal' Adds a non-regression test covering both incomplete fit and a separate transform call.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #837 +/- ##
=======================================
Coverage 96.85% 96.86%
=======================================
Files 128 128
Lines 25923 25938 +15
=======================================
+ Hits 25109 25126 +17
+ Misses 814 812 -2 🚀 New features to boost your workflow:
|
Collaborator
|
Hello @JaySingh79 thanks for the PR, this is a nice fix, could you please add the information in the RELEASE.md file in the Bug fix section (with referencexs to the Issue and PR) |
Contributor
Author
|
Sure
*Jay Singh*
*Final Year Undergraduate | *
*IIT Kharagpur*
Connect: LinkedIn <https://www.linkedin.com/in/jay-singh-736825227/> |
+91-8651274328 <https://wa.me/918651274328>
Work: Portfolio <https://jaysingh.vercel.app> | Github
<https://github.com/JaySingh79>
…On Wed, 26 Aug 2026, 16:57 Rémi Flamary, ***@***.***> wrote:
*rflamary* left a comment (PythonOT/POT#837)
<#837 (comment)>
Hello @JaySingh79 <https://github.com/JaySingh79> thanks for the PR, this
is a nice fix, could you please add the information in the RELEASE.md file
in the Bug fix section (with referencexs to the Issue and PR)
—
Reply to this email directly, view it on GitHub
<#837?email_source=notifications&email_token=AXHWRJTRM7UJG2H67BPK4LT5L3CQXA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKNBSGQ3DAMRWGY22M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-5424602665>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXHWRJSFM5OVVONMXXXGUT35L3CQXAVCNFSNUABEKJSXA33TNF2G64TZHM3TCNBXGI3DSNJ3JFZXG5LFHM2TEMRTGMYTGOBRG2QXMAQ>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/AXHWRJSRNWRCFJON7TYPM7T5L3CQXA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKNBSGQ3DAMRWGY22M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJKTGN5XXIZLSL5UW64Y>
and Android
<https://github.com/notifications/mobile/android/AXHWRJRN2VBYXH64WBEJYLL5L3CQXA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKNBSGQ3DAMRWGY22M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI>.
Download it today!
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Contributor
Author
Hey, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fit() now initializes the backend attribute nx before the check_params
gate, matching the behavior of BaseTransport.fit. Previously, a fit call
with missing parameters left self.nx as None, causing any subsequent
transform() call to crash with:
AttributeError: 'NoneType' object has no attribute 'array_equal'
Adds a non-regression test covering both incomplete fit and a separate
transform call.
Types of changes
Motivation and context / Related issue
How has this been tested (if it applies)
PR checklist