Skip to content

Commit

Permalink
Fix up style issues
Browse files Browse the repository at this point in the history
  • Loading branch information
gmarkall committed Aug 8, 2024
1 parent 80e9e36 commit 97ae4e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion numba_cuda/numba/cuda/stubs.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
"""
This script specifies all PTX special objects.
This scripts specifies all PTX special objects.
"""
import numpy as np
from collections import defaultdict
import functools
import itertools
from inspect import Signature, Parameter


class Stub(object):
'''
A stub object to represent special objects that are meaningless
Expand Down Expand Up @@ -53,6 +54,7 @@ def y(self):
def z(self):
pass


class threadIdx(Dim3):
'''
The thread indices in the current thread block. Each index is an integer
Expand Down
5 changes: 3 additions & 2 deletions numba_cuda/numba/cuda/tests/cudapy/test_print.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from numba.cuda.testing import CUDATestCase, skip_on_cudasim
import numpy as np
import subprocess
import sys
import unittest
Expand Down Expand Up @@ -121,8 +122,8 @@ def test_string(self):
def test_dim3(self):
output, _ = self.run_code(printdim3_usecase)
lines = [line.strip() for line in output.splitlines(True)]
expected = [str((k, j, i)) for i in range(2) for j in range(2) for k in range(2)]
self.assertEqual(sorted(lines), sorted(expected))
expected = [str(i) for i in np.ndindex(2, 2, 2)]
self.assertEqual(sorted(lines), expected)

@skip_on_cudasim('cudasim can print unlimited output')
def test_too_many_args(self):
Expand Down

0 comments on commit 97ae4e5

Please sign in to comment.