pgvector / pgvector-python

pgvector support for Python
MIT License
951 stars 63 forks source link

Add decorators to HalfVector #72

Closed domenicocinque closed 5 months ago

domenicocinque commented 5 months ago

Hi @ankane,

I would like to propose the introduction of the classmethod and staticmethod decorators to the vector classes. I think this would make the code more pythonic and it would help to clarify the responsibilities and context of methods.

For now i did it only for halfvec, if you like this change i can extend for the other vector classes.

ankane commented 5 months ago

Hi @domenicocinque, thanks for the PR. Added in the commit above.