test_api.py 文件源码

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

项目:aws-lambda-numpy 作者: vitolimandibhrata 项目源码 文件源码
def test_broadcast_arrays():
    # Test user defined dtypes
    a = np.array([(1, 2, 3)], dtype='u4,u4,u4')
    b = np.array([(1, 2, 3), (4, 5, 6), (7, 8, 9)], dtype='u4,u4,u4')
    result = np.broadcast_arrays(a, b)
    assert_equal(result[0], np.array([(1, 2, 3), (1, 2, 3), (1, 2, 3)], dtype='u4,u4,u4'))
    assert_equal(result[1], np.array([(1, 2, 3), (4, 5, 6), (7, 8, 9)], dtype='u4,u4,u4'))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号