mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-01-09 15:08:02 -05:00
fix shape types
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
repos:
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: pylint
|
||||
name: pylint
|
||||
entry: pylint tinygrad/
|
||||
language: system
|
||||
always_run: true
|
||||
pass_filenames: false
|
||||
- id: mypy
|
||||
name: mypy
|
||||
entry: mypy tinygrad/ --ignore-missing-imports
|
||||
language: system
|
||||
always_run: true
|
||||
pass_filenames: false
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: pylint
|
||||
name: pylint
|
||||
entry: pylint tinygrad/
|
||||
language: system
|
||||
always_run: true
|
||||
pass_filenames: false
|
||||
- id: mypy
|
||||
name: mypy
|
||||
entry: mypy tinygrad/ --ignore-missing-imports
|
||||
language: system
|
||||
always_run: true
|
||||
pass_filenames: false
|
||||
|
||||
@@ -21,7 +21,7 @@ def to_shape_strides(shape:Tuple[int, ...], strides:Tuple[int, ...]) -> List[Tup
|
||||
return ret
|
||||
|
||||
class View:
|
||||
def __init__(self, shape:Union[Tuple[int, ...],List[Any]], strides:Union[Tuple[int, ...],List[Any]], offset:int=0):
|
||||
def __init__(self, shape:Union[Tuple[int, ...],List[int]], strides:Union[Tuple[int, ...],List[int]], offset:int=0):
|
||||
self.shape, self.strides, self.offset = tuple(shape), tuple(strides), offset
|
||||
self.shape_strides = to_shape_strides(self.shape, self.strides)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user