test_defchararray.py 文件源码

python
阅读 35 收藏 0 点赞 0 评论 0

项目:radar 作者: amoose136 项目源码 文件源码
def test_title(self):
        tgt = asbytes_nested([[' Abc ', ''],
                              ['12345', 'Mixedcase'],
                              ['123 \t 345 \0 ', 'Upper']])
        assert_(issubclass(self.A.title().dtype.type, np.string_))
        assert_array_equal(self.A.title(), tgt)

        tgt = [[sixu(' \u03a3 '), sixu('')],
               [sixu('12345'), sixu('Mixedcase')],
               [sixu('123 \t 345 \0 '), sixu('Upper')]]
        assert_(issubclass(self.B.title().dtype.type, np.unicode_))
        assert_array_equal(self.B.title(), tgt)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号