File: //opt/alt/python37/lib64/python3.7/site-packages/numpy/lib/__pycache__/stride_tricks.cpython-37.pyc
B
@\���A�� @ sp d Z ddlmZmZmZ ddlZddgZG dd� de�Z dd � Z
ddd
�Zdd� Zddd�Z
dd� Zdd� ZdS )z�
Utilities that manipulate strides to achieve desirable effects.
An explanation of strides can be found in the "ndarray.rst" file in the
NumPy reference guide.
� )�division�absolute_import�print_functionN�broadcast_to�broadcast_arraysc @ s e Zd ZdZddd�ZdS )�
DummyArrayz�Dummy object that just exists to hang __array_interface__ dictionaries
and possibly keep alive a reference to a base array.
Nc C s || _ || _d S )N)�__array_interface__�base)�self� interfacer � r �J/opt/alt/python37/lib64/python3.7/site-packages/numpy/lib/stride_tricks.py�__init__ s zDummyArray.__init__)N)�__name__�
__module__�__qualname__�__doc__r r r r r
r s r c C s4 t | �t |�k r0|jt | �d�}|jr0|�| � |S )N)�type)r �viewZ__array_finalize__)Zoriginal_arrayZ new_arrayr r r
�_maybe_view_as_subclass s
r FTc C s~ t j| d|d�} t| j�}|dk r.t|�|d<