Skip to content

Commit ee71562

Browse files
committed
Corrected typo in exception text
1 parent 346200e commit ee71562

10 files changed

+29
-29
lines changed

dpctl/tensor/_usmarray.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ cdef class usm_ndarray:
325325
if (_offset + ary_min_displacement < 0 or
326326
(_offset + ary_max_displacement + 1) * itemsize > _buffer.nbytes):
327327
self._cleanup()
328-
raise ValueError(("buffer='{}' can not accomodate "
328+
raise ValueError(("buffer='{}' can not accommodate "
329329
"the requested array.").format(buffer))
330330
is_fp64 = (typenum == UAR_DOUBLE or typenum == UAR_CDOUBLE)
331331
is_fp16 = (typenum == UAR_HALF)

dpctl/tensor/libtensor/source/boolean_advanced_indexing.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -387,14 +387,14 @@ py_extract(dpctl::tensor::usm_ndarray src,
387387

388388
// ensure that dst is sufficiently ample
389389
auto dst_offsets = dst.get_minmax_offsets();
390-
// destination must be ample enough to accomodate all elements
390+
// destination must be ample enough to accommodate all elements
391391
{
392392
size_t range =
393393
static_cast<size_t>(dst_offsets.second - dst_offsets.first);
394394
if (range + 1 < static_cast<size_t>(ortho_nelems * masked_dst_nelems)) {
395395
throw py::value_error(
396396
"Memory addressed by the destination array can not "
397-
"accomodate all the "
397+
"accommodate all the "
398398
"array elements.");
399399
}
400400
}
@@ -716,14 +716,14 @@ py_place(dpctl::tensor::usm_ndarray dst,
716716

717717
// ensure that dst is sufficiently ample
718718
auto dst_offsets = dst.get_minmax_offsets();
719-
// destination must be ample enough to accomodate all elements
719+
// destination must be ample enough to accommodate all elements
720720
{
721721
size_t range =
722722
static_cast<size_t>(dst_offsets.second - dst_offsets.first);
723723
if (range + 1 < static_cast<size_t>(ortho_nelems * masked_dst_nelems)) {
724724
throw py::value_error(
725725
"Memory addressed by the destination array can not "
726-
"accomodate all the "
726+
"accommodate all the "
727727
"array elements.");
728728
}
729729
}
@@ -999,14 +999,14 @@ py_nonzero(dpctl::tensor::usm_ndarray
999999

10001000
// ensure that dst is sufficiently ample
10011001
auto indexes_offsets = indexes.get_minmax_offsets();
1002-
// destination must be ample enough to accomodate all elements
1002+
// destination must be ample enough to accommodate all elements
10031003
{
10041004
size_t range =
10051005
static_cast<size_t>(indexes_offsets.second - indexes_offsets.first);
10061006
if (range + 1 < static_cast<size_t>(nz_elems * _ndim)) {
10071007
throw py::value_error(
10081008
"Memory addressed by the destination array can not "
1009-
"accomodate all the array elements.");
1009+
"accommodate all the array elements.");
10101010
}
10111011
}
10121012

dpctl/tensor/libtensor/source/boolean_reductions.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,14 @@ py_boolean_reduction(dpctl::tensor::usm_ndarray src,
102102

103103
// ensure that dst is sufficiently ample
104104
auto dst_offsets = dst.get_minmax_offsets();
105-
// destination must be ample enough to accomodate all elements
105+
// destination must be ample enough to accommodate all elements
106106
{
107107
size_t range =
108108
static_cast<size_t>(dst_offsets.second - dst_offsets.first);
109109
if (range + 1 < static_cast<size_t>(dst_nelems)) {
110110
throw py::value_error(
111111
"Memory addressed by the destination array can not "
112-
"accomodate all the array elements.");
112+
"accommodate all the array elements.");
113113
}
114114
}
115115

dpctl/tensor/libtensor/source/copy_and_cast_usm_to_usm.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,14 @@ copy_usm_ndarray_into_usm_ndarray(dpctl::tensor::usm_ndarray src,
100100
return std::make_pair(sycl::event(), sycl::event());
101101
}
102102

103-
// destination must be ample enough to accomodate all elements
103+
// destination must be ample enough to accommodate all elements
104104
{
105105
auto dst_offsets = dst.get_minmax_offsets();
106106
size_t range =
107107
static_cast<size_t>(dst_offsets.second - dst_offsets.first);
108108
if (range + 1 < src_nelems) {
109109
throw py::value_error(
110-
"Destination array can not accomodate all the "
110+
"Destination array can not accommodate all the "
111111
"elements of source array.");
112112
}
113113
}

dpctl/tensor/libtensor/source/copy_for_reshape.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,14 @@ copy_usm_ndarray_for_reshape(dpctl::tensor::usm_ndarray src,
8888
return std::make_pair(sycl::event(), sycl::event());
8989
}
9090

91-
// destination must be ample enough to accomodate all elements
91+
// destination must be ample enough to accommodate all elements
9292
{
9393
auto dst_offsets = dst.get_minmax_offsets();
9494
py::ssize_t range =
9595
static_cast<py::ssize_t>(dst_offsets.second - dst_offsets.first);
9696
if (range + 1 < src_nelems) {
9797
throw py::value_error(
98-
"Destination array can not accomodate all the "
98+
"Destination array can not accommodate all the "
9999
"elements of source array.");
100100
}
101101
}

dpctl/tensor/libtensor/source/copy_numpy_ndarray_into_usm_ndarray.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,14 @@ void copy_numpy_ndarray_into_usm_ndarray(
8989
}
9090

9191
auto dst_offsets = dst.get_minmax_offsets();
92-
// destination must be ample enough to accomodate all elements of source
92+
// destination must be ample enough to accommodate all elements of source
9393
// array
9494
{
9595
size_t range =
9696
static_cast<size_t>(dst_offsets.second - dst_offsets.first);
9797
if (range + 1 < src_nelems) {
9898
throw py::value_error(
99-
"Destination array can not accomodate all the "
99+
"Destination array can not accommodate all the "
100100
"elements of source array.");
101101
}
102102
}

dpctl/tensor/libtensor/source/elementwise_functions.hpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,15 @@ py_unary_ufunc(dpctl::tensor::usm_ndarray src,
113113
return std::make_pair(sycl::event(), sycl::event());
114114
}
115115

116-
// ensure that output is ample enough to accomodate all elements
116+
// ensure that output is ample enough to accommodate all elements
117117
auto dst_offsets = dst.get_minmax_offsets();
118-
// destination must be ample enough to accomodate all elements
118+
// destination must be ample enough to accommodate all elements
119119
{
120120
size_t range =
121121
static_cast<size_t>(dst_offsets.second - dst_offsets.first);
122122
if (range + 1 < src_nelems) {
123123
throw py::value_error(
124-
"Destination array can not accomodate all the "
124+
"Destination array can not accommodate all the "
125125
"elements of source array.");
126126
}
127127
}
@@ -366,15 +366,15 @@ std::pair<sycl::event, sycl::event> py_binary_ufunc(
366366
return std::make_pair(sycl::event(), sycl::event());
367367
}
368368

369-
// ensure that output is ample enough to accomodate all elements
369+
// ensure that output is ample enough to accommodate all elements
370370
auto dst_offsets = dst.get_minmax_offsets();
371-
// destination must be ample enough to accomodate all elements
371+
// destination must be ample enough to accommodate all elements
372372
{
373373
size_t range =
374374
static_cast<size_t>(dst_offsets.second - dst_offsets.first);
375375
if (range + 1 < src_nelems) {
376376
throw py::value_error(
377-
"Destination array can not accomodate all the "
377+
"Destination array can not accommodate all the "
378378
"elements of source array.");
379379
}
380380
}
@@ -664,15 +664,15 @@ py_binary_inplace_ufunc(dpctl::tensor::usm_ndarray lhs,
664664
return std::make_pair(sycl::event(), sycl::event());
665665
}
666666

667-
// ensure that output is ample enough to accomodate all elements
667+
// ensure that output is ample enough to accommodate all elements
668668
auto lhs_offsets = lhs.get_minmax_offsets();
669-
// destination must be ample enough to accomodate all elements
669+
// destination must be ample enough to accommodate all elements
670670
{
671671
size_t range =
672672
static_cast<size_t>(lhs_offsets.second - lhs_offsets.first);
673673
if (range + 1 < rhs_nelems) {
674674
throw py::value_error(
675-
"Destination array can not accomodate all the "
675+
"Destination array can not accommodate all the "
676676
"elements of source array.");
677677
}
678678
}

dpctl/tensor/libtensor/source/sum_reductions.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,14 @@ std::pair<sycl::event, sycl::event> py_sum_over_axis(
142142
throw py::value_error("Arrays index overlapping segments of memory");
143143
}
144144

145-
// destination must be ample enough to accomodate all elements
145+
// destination must be ample enough to accommodate all elements
146146
{
147147
auto dst_offsets = dst.get_minmax_offsets();
148148
size_t range =
149149
static_cast<size_t>(dst_offsets.second - dst_offsets.first);
150150
if (range + 1 < dst_nelems) {
151151
throw py::value_error(
152-
"Destination array can not accomodate all the "
152+
"Destination array can not accommodate all the "
153153
"elements of source array.");
154154
}
155155
}

dpctl/tensor/libtensor/source/where.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,14 +132,14 @@ py_where(dpctl::tensor::usm_ndarray condition,
132132

133133
// ensure that dst is sufficiently ample
134134
auto dst_offsets = dst.get_minmax_offsets();
135-
// destination must be ample enough to accomodate all elements
135+
// destination must be ample enough to accommodate all elements
136136
{
137137
size_t range =
138138
static_cast<size_t>(dst_offsets.second - dst_offsets.first);
139139
if (range + 1 < static_cast<size_t>(nelems)) {
140140
throw py::value_error(
141141
"Memory addressed by the destination array can not "
142-
"accomodate all the "
142+
"accommodate all the "
143143
"array elements.");
144144
}
145145
}

dpctl/tests/test_usm_ndarray_ctor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1602,7 +1602,7 @@ def test_arange(dt):
16021602
elif np.issubdtype(dt, np.complexfloating):
16031603
assert complex(X[47]) == 47.0 + 0.0j
16041604

1605-
# choose size larger than maximal value that u1/u2 can accomodate
1605+
# choose size larger than maximal value that u1/u2 can accommodate
16061606
sz = int(dpt.iinfo(dpt.int8).max)
16071607
X1 = dpt.arange(sz + 1, dtype=dt, sycl_queue=q)
16081608
assert X1.shape == (sz + 1,)

0 commit comments

Comments
 (0)