3
���h�� � W @ sX d Z ddlZddlZddlmZ ddlmZ ddlT ddlmZmZmZm Z m
Z
mZmZm
Z
mZ dd d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^gWZd_e _d_e_d`e_d`e_d`e_d`e_d`e_d`e_d`e_d`e_d`e_d`e_d`e_d`e_d`e_d`e_d`e _d`e!_ej"ej#d`dadbdc�Z$e$ej%�d|ddd7��Z%e$ej&�d}ded)��Z&e$ej'�dfd@� �Z'e$ej(�d~dgd]��Z(e$ej)�ddhdD��Z)e$ej*�d�did'��Z*e$ej+�djdG� �Z+e$ej,�dkdP� �Z,e$ej-�d�dld2��Z-e$ej.�dmd\� �Z.e$ej/�d�dnd"��Z/e$ej0�d�dodO��Z0e$ej1�d�dpd[��Z1e$ej2�d�dqd*��Z2e$ej3�drdN� �Z3e$ej4�d�dtdL��Z4e$ej5�d�dudZ��Z5e$ej6�d�dvdW��Z6e$ej�d�dwdF��Ze$ej7�d�dxdC��Z7e$ej8�d�dyd%��Z8e$ej9�d�dzd$��Z9e$ej:�d�d{d/��Z:dS )�a
Create the numpy.core.multiarray namespace for backward compatibility. In v1.16
the multiarray and umath c-extension modules were merged into a single
_multiarray_umath extension module. So we replicate the old namespace
by importing from the extension module.
� N� )� overrides)�_multiarray_umath)�*) �_fastCopyAndTranspose� _flagdict�_insert�_reconstruct�_vec_string�
_ARRAY_API�
_monotonicity�_get_ndarray_c_version�_set_madvise_hugepager Z
ALLOW_THREADSZBUFSIZEZCLIPZ
DATETIMEUNITSZITEM_HASOBJECTZITEM_IS_POINTERZLIST_PICKLEZMAXDIMSZMAY_SHARE_BOUNDSZMAY_SHARE_EXACTZ
NEEDS_INITZNEEDS_PYAPIZRAISEZUSE_GETITEMZUSE_SETITEMZWRAPr r r r r
r Z
add_docstring�arange�array�bincount� broadcast�busday_count�
busday_offsetZbusdaycalendar�can_castZcompare_chararrays�concatenate�copytoZ correlateZ
correlate2Z
count_nonzeroZc_einsum�datetime_as_string�
datetime_dataZdigitize�dotZdragon4_positionalZdragon4_scientific�dtype�empty�
empty_like�errorZflagsobjZflatiterZformat_longfloat�
frombuffer�fromfile�fromiter�
fromstring�innerZinterpZinterp_complex� is_busday�lexsort�matmul�may_share_memory�min_scalar_typeZndarrayZnditer�nested_itersZnormalize_axis_index�packbits�
promote_types�putmask�ravel_multi_index�result_type�scalarZset_datetimeparse_functionZset_legacy_print_mode�set_numeric_opsZset_string_functionZset_typeDict�
shares_memoryZtracemalloc_domainZtypeinfo�
unpackbits�
unravel_index�vdot�where�zerosznumpy.core.multiarrayZnumpyTF)�moduleZdocs_from_dispatcher�verifyc C s | fS )a
empty_like(prototype, dtype=None, order='K', subok=True, shape=None)
Return a new array with the same shape and type as a given array.
Parameters
----------
prototype : array_like
The shape and data-type of `prototype` define these same attributes
of the returned array.
dtype : data-type, optional
Overrides the data type of the result.
.. versionadded:: 1.6.0
order : {'C', 'F', 'A', or 'K'}, optional
Overrides the memory layout of the result. 'C' means C-order,
'F' means F-order, 'A' means 'F' if ``prototype`` is Fortran
contiguous, 'C' otherwise. 'K' means match the layout of ``prototype``
as closely as possible.
.. versionadded:: 1.6.0
subok : bool, optional.
If True, then the newly created array will use the sub-class
type of 'a', otherwise it will be a base-class array. Defaults
to True.
shape : int or sequence of ints, optional.
Overrides the shape of the result. If order='K' and the number of
dimensions is unchanged, will try to keep order, otherwise,
order='C' is implied.
.. versionadded:: 1.17.0
Returns
-------
out : ndarray
Array of uninitialized (arbitrary) data with the same
shape and type as `prototype`.
See Also
--------
ones_like : Return an array of ones with shape and type of input.
zeros_like : Return an array of zeros with shape and type of input.
full_like : Return a new array with shape of input filled with value.
empty : Return a new uninitialized array.
Notes
-----
This function does *not* initialize the returned array; to do that use
`zeros_like` or `ones_like` instead. It may be marginally faster than
the functions that do set the array values.
Examples
--------
>>> a = ([1,2,3], [4,5,6]) # a is array-like
>>> np.empty_like(a)
array([[-1073741821, -1073741821, 3], # uninitialized
[ 0, 0, -1073741821]])
>>> a = np.array([[1., 2., 3.],[4.,5.,6.]])
>>> np.empty_like(a)
array([[ -2.00000715e+000, 1.48219694e-323, -2.00000572e+000], # uninitialized
[ 4.38791518e-305, -2.00000715e+000, 4.17269252e-309]])
� )Z prototyper �orderZsubok�shaper9 r9 �6/tmp/pip-build-5_djhm0z/numpy/numpy/core/multiarray.pyr K s Ac C s |dk rt | �} | j|� | S )an
concatenate((a1, a2, ...), axis=0, out=None)
Join a sequence of arrays along an existing axis.
Parameters
----------
a1, a2, ... : sequence of array_like
The arrays must have the same shape, except in the dimension
corresponding to `axis` (the first, by default).
axis : int, optional
The axis along which the arrays will be joined. If axis is None,
arrays are flattened before use. Default is 0.
out : ndarray, optional
If provided, the destination to place the result. The shape must be
correct, matching that of what concatenate would have returned if no
out argument were specified.
Returns
-------
res : ndarray
The concatenated array.
See Also
--------
ma.concatenate : Concatenate function that preserves input masks.
array_split : Split an array into multiple sub-arrays of equal or
near-equal size.
split : Split array into a list of multiple sub-arrays of equal size.
hsplit : Split array into multiple sub-arrays horizontally (column wise).
vsplit : Split array into multiple sub-arrays vertically (row wise).
dsplit : Split array into multiple sub-arrays along the 3rd axis (depth).
stack : Stack a sequence of arrays along a new axis.
block : Assemble arrays from blocks.
hstack : Stack arrays in sequence horizontally (column wise).
vstack : Stack arrays in sequence vertically (row wise).
dstack : Stack arrays in sequence depth wise (along third dimension).
column_stack : Stack 1-D arrays as columns into a 2-D array.
Notes
-----
When one or more of the arrays to be concatenated is a MaskedArray,
this function will return a MaskedArray object instead of an ndarray,
but the input masks are *not* preserved. In cases where a MaskedArray
is expected as input, use the ma.concatenate function from the masked
array module instead.
Examples
--------
>>> a = np.array([[1, 2], [3, 4]])
>>> b = np.array([[5, 6]])
>>> np.concatenate((a, b), axis=0)
array([[1, 2],
[3, 4],
[5, 6]])
>>> np.concatenate((a, b.T), axis=1)
array([[1, 2, 5],
[3, 4, 6]])
>>> np.concatenate((a, b), axis=None)
array([1, 2, 3, 4, 5, 6])
This function will not preserve masking of MaskedArray inputs.
>>> a = np.ma.arange(3)
>>> a[1] = np.ma.masked
>>> b = np.arange(2, 5)
>>> a
masked_array(data=[0, --, 2],
mask=[False, True, False],
fill_value=999999)
>>> b
array([2, 3, 4])
>>> np.concatenate([a, b])
masked_array(data=[0, 1, 2, 2, 3, 4],
mask=False,
fill_value=999999)
>>> np.ma.concatenate([a, b])
masked_array(data=[0, --, 2, 2, 3, 4],
mask=[False, True, False, False, False, False],
fill_value=999999)
N)�list�append)Zarrays�axis�outr9 r9 r< |