* Peter Cock <p.j.a.c...@googlemail.com>, 2014-06-13, 14:57:
Line 555-557,
clusterid, celldata = somcluster(data=data, mask=mask, weight=weight,
transpose=0, nxgrid=10, nygrid=10,
inittau=0.02, niter=100, dist='e')
This all give the following error via C function distance_converter in
Bio/Cluster/clustermodule.c
ValueError: distance should be a single character
Yet in all those examples, dist='e' which is a single character...
I had a quick looks at the code:
if (PyUnicode_Check(object))
data = PyUnicode_AS_DATA(object);
# ...
if (strlen(data)!=1)
{ PyErr_Format(PyExc_ValueError, "method should be a single character (not
'%s')", data);
return 0;
}
But PyUnicode_AS_DATA() returns a pointer to UTF-32 data. On big-endian
architectures (such as powerpc or s390x), the first byte is always 0, so
strlen() returns 0.
--
Jakub Wilk
--
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org