How to solve PyTorch UnicodeEncodeError error when using torch.from_numpy?

I am using PyTorch with python3.
I tried the following while in ipdb mode:

regions = np.zeros([107,4], dtype='uint8')
torch.from_numpy(regions)

This prints the tensor.
However when trying:

regions = np.zeros([107,107,4], dtype='uint8')
torch.from_numpy(regions)

I get the following error:

*** UnicodeEncodeError: 'ascii' codec can't encode character '\u22ee' in position 72: ordinal not in range(128)

I’m am using:

numpy==1.11.3
torch==0.2.0.post4
torchvision==0.1.9

and python3.5.3

I’m on np version 1.13.3, python 3.6.3, and pytorch master and it appears to work for me. Maybe try building pytorch from source?

I’m looking for a simpler solution