Skip to content

Commit

Permalink
format with black
Browse files Browse the repository at this point in the history
  • Loading branch information
ozancaglayan committed Feb 1, 2024
1 parent 772e7bd commit 04be6e1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions python/tests/test_storage_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ def test_storageview_cpu(dtype, name):


def test_storageview_to_device():
x = np.ones(10, dtype='float32')
x = np.ones(10, dtype="float32")
cx = ctranslate2.StorageView.from_array(x)

assert cx.device == 'cpu'
assert cx.device == "cpu"
assert cx.dtype == ctranslate2.DataType.float32

cpu_x = cx.to_device(ctranslate2.Device.cpu)
Expand Down Expand Up @@ -87,10 +87,10 @@ def test_storageview_cuda():

@test_utils.require_cuda
def test_storageview_cuda_to_device():
x = np.ones(10, dtype='float32')
x = np.ones(10, dtype="float32")
# convert to cuda tensor
cuda_x = ctranslate2.StorageView.from_array(x).to_device(ctranslate2.Device.cuda)
assert cuda_x.device == 'cuda'
assert cuda_x.device == "cuda"

# modify original tensor and convert back
x *= 2
Expand Down

0 comments on commit 04be6e1

Please sign in to comment.