Skip to content

Comments

Fix 'NonHierarchicalClustering' object has no attribute 'ranges' ch5#23

Open
Dantali0n wants to merge 1 commit intomhoogen:masterfrom
Dantali0n:fix_gower_self_range_ch5
Open

Fix 'NonHierarchicalClustering' object has no attribute 'ranges' ch5#23
Dantali0n wants to merge 1 commit intomhoogen:masterfrom
Dantali0n:fix_gower_self_range_ch5

Conversation

@Dantali0n
Copy link

In chapter 5 method compute_distance_matrix_instances the attribute self.ranges
is accessed but this is unset. The cause is that ranges above is set as variable
within the scope of the current method but since this is not the constructor of
the class it does not actually set self.ranges. This in turn causes the
subsequent access to result in an AttributeError.

This pull request resolves the aforementioned issues above.

In chapter 5 method compute_distance_matrix_instances the attribute self.ranges
is accessed but this is unset. The cause is that ranges above is set as variable
within the scope of the current method but since this is not the constructor of
the class it does not actually set self.ranges. This in turn causes the
subsequent access to result in an AttributeError.
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.

1 participant