From: Travis O. <oli...@ee...> - 2006-10-11 17:04:21
|
Charles R Harris wrote: > > > On 10/11/06, *Keith Goodman* <kwg...@gm... > <mailto:kwg...@gm...>> wrote: > > On 10/11/06, Keith Goodman <kwg...@gm... > <mailto:kwg...@gm...>> wrote: > > This works: > > > > >> M.asmatrix(['a', 'b', None]) > > matrix([[a, b, None]], dtype=object) > > > > But this doesn't: > > > > >> M.asmatrix(['a', 'b', None, 'c']) > > TypeError: expected a readable buffer object > > > > > As a side observation, I note that the 'None' is also non-printing: > > >>> a = asarray(['a', 'b', None, 'c'], dtype=object) > >>> a[2] > >>> str(a[2]) > 'None' > > I wonder if this should be changed? That's Python's decision. You are getting back the None object when you access element a[2]. Thus, there is no way to change it. -Travis |