3
­?d]=  ã               @   s®   d dl mZmZmZ d dlZd dlZd dlZyd dlZW n e	k
rP   dZY nX ddd„Z
ejjejd  dk dd�dd	„ ƒZd
d„ Zdd„ Zejjedkdd�dd„ ƒZdS )é    )ÚdivisionÚabsolute_importÚprint_functionNc             C   sd   |dkr| j }i }xLt| ƒD ]@}t| |ƒ}t|dƒrt|dƒr|j|kr|jd |j  ||< qW |S )zEReturns a mapping of all objects with the wrong __module__ attribute.NÚ
__module__Ú__name__Ú.)r   ÚdirÚgetattrÚhasattrr   )ÚmoduleÚmodule_nameÚresultsÚnameÚitem© r   ú</tmp/pip-build-op5p2y5_/numpy/numpy/tests/test_public_api.pyÚ	check_dir   s    

r   é   z6NumPy exposes slightly different functions on Python 2)Úreasonc              C   sl   dddddddddd	d
ddddddddddddœ} dddddddddœ}t | f|Ž}ttƒ}||ksht‚d S )Nz,numpy.testing._private.nosetester.NoseTesterz.numpy.core._multiarray_umath._add_newdoc_ufuncz*numpy.core._multiarray_umath.add_docstringz#numpy.core.function_base.add_newdocznumpy.lib.utils.byte_boundsz/numpy.core._multiarray_umath.compare_chararraysznumpy.lib.utils.deprecateznumpy.lib.utils.<lambda>znumpy.lib.function_base.dispz2numpy.core._multiarray_umath._fastCopyAndTransposez#numpy.lib.shape_base.get_array_wrapznumpy.lib.utils.get_includez)numpy.core._multiarray_umath.int_asbufferznumpy.lib.npyio.mafromtxtznumpy.lib.npyio.ndfromtxtznumpy.lib.npyio.recfromcsvznumpy.lib.npyio.recfromtxtznumpy.lib.utils.safe_evalz)numpy.core.arrayprint.set_string_functionznumpy.__config__.showznumpy.lib.utils.who)ZTesterZ_add_newdoc_ufuncZadd_docstringZ
add_newdocZadd_newdoc_ufuncZbyte_boundsZcompare_chararraysZ	deprecateZdeprecate_with_docZdispZfastCopyAndTransposeZget_array_wrapZget_includeZint_asbufferZ	mafromtxtZ	ndfromtxtZ
recfromcsvZ
recfromtxtZ	safe_evalZset_string_functionZshow_configZwhozbuiltins.boolzbuiltins.complexzbuiltins.floatzbuiltins.intzbuiltins.objectzbuiltins.str)ÚboolÚcomplexÚfloatÚintÚlongÚobjectÚstrÚunicode)Údictr   ÚnpÚAssertionError)ZundocumentedÚbuiltinsZ	whitelistÚbad_resultsr   r   r   Útest_numpy_namespace   sB    r"   c              C   s   t tjƒ} | i kst‚d S )N)r   r   Zlinalgr   )r!   r   r   r   Útest_numpy_linalgH   s    
r#   c              C   s   t tjƒ} | i kst‚d S )N)r   r   Zfftr   )r!   r   r   r   Útest_numpy_fftM   s    
r$   z#ctypes not available in this pythonc              C   s0   t jtjjjƒ} t| dd ƒ}|d ks,tdƒ‚d S )NZtest_not_exportedzG'test_not_exported' is mistakenly exported, NPY_NO_EXPORT does not work)ÚctypesÚCDLLr   ÚcoreZ_multiarray_testsÚ__file__r	   r   )ÚcdllÚfr   r   r   Útest_NPY_NO_EXPORTQ   s    r+   )N)Ú
__future__r   r   r   ÚsysZnumpyr   Zpytestr%   ÚImportErrorr   ÚmarkZskipifÚversion_infor"   r#   r$   r+   r   r   r   r   Ú<module>   s   

-