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
| import logging | |
| logging.basicConfig() | |
| logging.getLogger('sqlalchemy.engine').setLevel(logging.DEBUG) |
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
| import numpy as np | |
| class CustomArray(np.ndarray): | |
| def __new__(cls, matrix, custom_attribute): | |
| obj = np.asarray(matrix).view(cls) | |
| obj.custom_attribute = custom_attribute | |
| return obj | |
| def __array_finalize__(self, obj): | |
| if obj is None: | |
| return |