Fixes #366

Fixes issue #366 , multiprocessing applications raise an AttributeError: 'thread._local' object has no attribute 'astype'