Skip to content

Commit c43cdfb

Browse files
committed
add __slots__ to speed up
1 parent 2bb2321 commit c43cdfb

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

dotplot/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ def __init__(self, df_size: pd.DataFrame,
1919
:param df_size: the DataFrame object represents the scatter size in dotplot
2020
:param df_color: the DataFrame object represents the color in dotplot
2121
"""
22+
__slots__ = ['size_data', 'color_data', 'height', 'width', 'resized_size_data']
2223
if (df_color is not None) & (df_size.shape != df_color.shape):
2324
raise ValueError('df_size and df_color should have the same dimension')
2425
self.size_data = df_size

0 commit comments

Comments
 (0)