mirror of
https://github.com/iperov/DeepFaceLive
synced 2025-08-20 21:43:22 -07:00
add xlib.avecl
This commit is contained in:
parent
932edfe875
commit
0058474da7
56 changed files with 5569 additions and 0 deletions
37
xlib/avecl/_internal/info/TransposeInfo.py
Normal file
37
xlib/avecl/_internal/info/TransposeInfo.py
Normal file
|
@ -0,0 +1,37 @@
|
|||
from ..AShape import AShape
|
||||
from ..AAxes import AAxes
|
||||
|
||||
class TransposeInfo:
|
||||
"""
|
||||
TransposeInfo
|
||||
|
||||
arguments
|
||||
|
||||
shape AShape
|
||||
|
||||
axes_order AAxes
|
||||
|
||||
errors during the construction:
|
||||
|
||||
ValueError
|
||||
|
||||
result
|
||||
|
||||
.o_shape AShape
|
||||
|
||||
.no_changes bool transpose changes nothing
|
||||
|
||||
"""
|
||||
|
||||
__slots__ = ['no_changes', 'o_shape']
|
||||
|
||||
def __init__(self, shape : AShape, axes_order : AAxes):
|
||||
if shape.ndim != axes_order.ndim:
|
||||
raise ValueError('axes must match the shape')
|
||||
|
||||
# Axes order changes nothing?
|
||||
self.o_shape = shape[axes_order]
|
||||
self.no_changes = axes_order == shape.axes_arange()
|
||||
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue