Any tips in creating libraries/frameworks which are compatible with both pytorch and numpy arrays?

I am creating a pytorch library. I am trying to make it as friendly as possible for inputs in both pytorch tensors and numpy arrays.

If there are are there any particular methods and tips that are best for this, I would love to hear them!