Solved by ptrblck in post #2 
              
              
                I’m not sure, if this method is exposed in the Python API, but you might create a custom dict mapping the numpy dtypes to PyTorch ones.