We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bacfa59 commit 253c20eCopy full SHA for 253c20e
dpctl/tests/test_usm_ndarray_ctor.py
@@ -129,6 +129,25 @@ def test_usm_ndarray_flags_bug_gh_1334():
129
assert r.flags["F"] and r.flags["C"]
130
131
132
+def test_usm_ndarray_writable_flag_views():
133
+ get_queue_or_skip()
134
+ a = dpt.arange(10, dtype="f4")
135
+ a.flags["W"] = False
136
+
137
+ a.shape = (5, 2)
138
+ assert not a.flags.writable
139
+ assert not a.T.flags.writable
140
+ assert not a.mT.flags.writable
141
+ assert not a.real.flags.writable
142
+ assert not a[0:3].flags.writable
143
144
+ a = dpt.arange(10, dtype="c8")
145
146
147
148
+ assert not a.imag.flags.writable
149
150
151
@pytest.mark.parametrize(
152
"dtype",
153
[
0 commit comments