Use scipy.lib.six.string_types in place of basestring