3
���h< � @ sd d dl Zd dlZ d dlmZmZ dd� Zdd� Zdd� Zd d
� Z dd� Z
d
d� Zdd� Zdd� Z
dS )� N)�assert_array_equal�assert_c C s, t jjd�} tt| tj�� t| jd� d S )N� � )r )r r )�numpy�matlib�emptyr �
isinstance�np�matrix�shape)�x� r �8/tmp/pip-build-5_djhm0z/numpy/numpy/tests/test_matlib.py�
test_empty s r c C sJ t tjjd�tjdddgdddgg�� t tjjd�tjddgg�� d S )Nr � g �?)r r )r r r Zonesr
r r r r r � test_ones
s r c C sJ t tjjd�tjdddgdddgg�� t tjjd�tjddgg�� d S )Nr r g )r r )r r r �zerosr
r r r r r �
test_zeros s r c C s0 t jjdtd�} t| tjddgddgg�� d S )Nr )�dtyper r )r r �identity�intr r
r )r
r r r �
test_identity s r c C s� t jjddtd�} t| tjdddgdddgdddgg�� | jjsFt �| jj
sTt �t jjddtdd�}t|tjddddgddddgddddgg�� |jj s�t �|jj
s�t �d S )Nr r )�kr r � �F)r �order)r r Zeyer r r
r �flags�c_contiguous�AssertionError�f_contiguous)ZxcZxfr r r �test_eye s
r! c C s t jjd�} t| jdk� d S )Nr r )r r Zrandr �ndim)r
r r r � test_rand+ s r# c C s t jjd�} t| jdk� d S )Nr r )r
r Zrandnr r" |