§
    íNgX  ã                   óf   — d dl mZ d dlZdeej        df         fd„Zdeej        df         fd„ZdS )é    )ÚTupleNÚreturn.c                  ób   — 	 t          j        | ddiŽS # t          $ r t          j        | Ž cY S w xY w)að  generate N-D grid in dimension order.

    The ndgrid function is like meshgrid except that the order of the first two input arguments are switched.

    That is, the statement
    [X1,X2,X3] = ndgrid(x1,x2,x3)

    produces the same result as

    [X2,X1,X3] = meshgrid(x2,x1,x3)

    This naming is based on MATLAB, the purpose is to avoid confusion due to torch's change to make
    torch.meshgrid behaviour move from matching ndgrid ('ij') indexing to numpy meshgrid defaults of ('xy').

    ÚindexingÚij)ÚtorchÚmeshgridÚ	TypeError©Útensorss    úL/var/www/html/ai-engine/env/lib/python3.11/site-packages/timm/layers/grid.pyÚndgridr      sL   € ð (ÝŒ~˜wÐ6°Ð6Ð6Ð6øÝð (ð (ð (õ Œ~˜wÐ'Ð'Ð'Ð'ð(øøøs   ‚ “.­.c                  ó$   — t          j        | ddiŽS )aì  generate N-D grid in spatial dim order.

    The meshgrid function is similar to ndgrid except that the order of the
    first two input and output arguments is switched.

    That is, the statement

    [X,Y,Z] = meshgrid(x,y,z)
    produces the same result as

    [Y,X,Z] = ndgrid(y,x,z)
    Because of this, meshgrid is better suited to problems in two- or three-dimensional Cartesian space,
    while ndgrid is better suited to multidimensional problems that aren't spatially based.
    r   Úxy)r   r	   r   s    r   r	   r	      s   € õ$ Œ>˜7Ð2¨TÐ2Ð2Ð2ó    )Útypingr   r   ÚTensorr   r	   © r   r   ú<module>r      sx   ðØ Ð Ð Ð Ð Ð à €€€ð(˜˜eœl¨CÐ/Ô0ð (ð (ð (ð (ð03˜% ¤¨cÐ 1Ô2ð 3ð 3ð 3ð 3ð 3ð 3r   