balance parenthesis (add closing bracket) (#11563)

* balance parenthesis (add closing bracket)

* Apply suggestions from code review

---------

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
This commit is contained in:
apples53 2024-09-24 13:00:36 +05:30 committed by GitHub
parent 50cc00bb2d
commit 9b5641d2d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -28,7 +28,7 @@ if __name__ == "__main__":
union = fuzz.fuzzy_or(X, young, X, middle_aged)[1] union = fuzz.fuzzy_or(X, young, X, middle_aged)[1]
# 2. Intersection = min(µA(x), µB(x)) # 2. Intersection = min(µA(x), µB(x))
intersection = fuzz.fuzzy_and(X, young, X, middle_aged)[1] intersection = fuzz.fuzzy_and(X, young, X, middle_aged)[1]
# 3. Complement (A) = (1- min(µA(x)) # 3. Complement (A) = (1 - min(µA(x)))
complement_a = fuzz.fuzzy_not(young) complement_a = fuzz.fuzzy_not(young)
# 4. Difference (A/B) = min(µA(x),(1- µB(x))) # 4. Difference (A/B) = min(µA(x),(1- µB(x)))
difference = fuzz.fuzzy_and(X, young, X, fuzz.fuzzy_not(middle_aged)[1])[1] difference = fuzz.fuzzy_and(X, young, X, fuzz.fuzzy_not(middle_aged)[1])[1]