@@ -143,6 +143,10 @@ class _dok_base(_spbase[_SCT, _ShapeT_co], IndexMixin[_SCT, _ShapeT_co], dict[Sh
143
143
@override
144
144
def todok (self , / , copy : bool = False ) -> Self : ...
145
145
146
+ #
147
+ @override
148
+ def __len__ (self , / ) -> int : ...
149
+
146
150
#
147
151
@overload
148
152
def __delitem__ (self : _dok_base [Any , _2D ], key : _ToKey2D , / ) -> None : ...
@@ -185,59 +189,69 @@ class _dok_base(_spbase[_SCT, _ShapeT_co], IndexMixin[_SCT, _ShapeT_co], dict[Sh
185
189
186
190
#
187
191
@overload
188
- def get (self : _dok_base [Any , _2D ], key : _ToKey2D , / , default : _T ) -> _SCT | _T : ...
192
+ def get (self : _dok_base [Any , _2D ], / , key : _ToKey2D , default : _T ) -> _SCT | _T : ...
189
193
@overload
190
- def get (self : _dok_base [Any , _2D ], key : _ToKey2D , / , default : float = 0.0 ) -> _SCT | float : ...
194
+ def get (self : _dok_base [Any , _2D ], / , key : _ToKey2D , default : float = 0.0 ) -> _SCT | float : ...
191
195
@overload
192
- def get (self : _dok_base [Any , _1D ], key : _ToKey1D , / , default : _T ) -> _SCT | _T : ...
196
+ def get (self : _dok_base [Any , _1D ], / , key : _ToKey1D , default : _T ) -> _SCT | _T : ...
193
197
@overload
194
- def get (self : _dok_base [Any , _1D ], key : _ToKey1D , / , default : float = 0.0 ) -> _SCT | float : ...
198
+ def get (self : _dok_base [Any , _1D ], / , key : _ToKey1D , default : float = 0.0 ) -> _SCT | float : ...
195
199
@overload
196
- def get (self , key : _ToKey1D | _ToKey2D , / , default : _T ) -> _SCT | _T : ...
200
+ def get (self , / , key : _ToKey1D | _ToKey2D , default : _T ) -> _SCT | _T : ...
197
201
@overload
198
- def get (self , key : _ToKey1D | _ToKey2D , / , default : float = 0.0 ) -> _SCT | float : ...
202
+ def get (self , / , key : _ToKey1D | _ToKey2D , default : float = 0.0 ) -> _SCT | float : ...
199
203
200
204
#
201
205
def conjtransp (self , / ) -> Self : ...
202
206
203
207
#
204
208
@overload
205
209
@classmethod
206
- def fromkeys (cls : type [_dok_base [_SCT , _2D ]], ks : _ToKeys2D , v : _SCT , / ) -> _dok_base [_SCT , _2D ]: ...
210
+ def fromkeys (cls : type [_dok_base [_SCT , _2D ]], iterable : _ToKeys2D , v : _SCT , / ) -> _dok_base [_SCT , _2D ]: ...
207
211
@overload
208
212
@classmethod
209
- def fromkeys (cls : type [_dok_base [_SCT , _1D ]], ks : _ToKeys1D , v : _SCT , / ) -> _dok_base [_SCT , _1D ]: ...
213
+ def fromkeys (cls : type [_dok_base [_SCT , _1D ]], iterable : _ToKeys1D , v : _SCT , / ) -> _dok_base [_SCT , _1D ]: ...
210
214
@overload
211
215
@classmethod
212
- def fromkeys (cls : type [_dok_base [np .bool_ , _2D ]], ks : _ToKeys2D , v : onp .ToBool , / ) -> _dok_base [np .bool_ , _2D ]: ...
216
+ def fromkeys (cls : type [_dok_base [np .bool_ , _2D ]], iterable : _ToKeys2D , v : onp .ToBool , / ) -> _dok_base [np .bool_ , _2D ]: ...
213
217
@overload
214
218
@classmethod
215
- def fromkeys (cls : type [_dok_base [np .bool_ , _1D ]], ks : _ToKeys1D , v : onp .ToBool , / ) -> _dok_base [np .bool_ , _1D ]: ...
219
+ def fromkeys (cls : type [_dok_base [np .bool_ , _1D ]], iterable : _ToKeys1D , v : onp .ToBool , / ) -> _dok_base [np .bool_ , _1D ]: ...
216
220
@overload
217
221
@classmethod
218
- def fromkeys (cls : type [_dok_base [np .int_ , _2D ]], ks : _ToKeys2D , v : opt .JustInt = 1 , / ) -> _dok_base [np .int_ , _2D ]: ...
222
+ def fromkeys (cls : type [_dok_base [np .int_ , _2D ]], iterable : _ToKeys2D , v : opt .JustInt = 1 , / ) -> _dok_base [np .int_ , _2D ]: ...
219
223
@overload
220
224
@classmethod
221
- def fromkeys (cls : type [_dok_base [np .int_ , _1D ]], ks : _ToKeys1D , v : opt .JustInt = 1 , / ) -> _dok_base [np .int_ , _1D ]: ...
225
+ def fromkeys (cls : type [_dok_base [np .int_ , _1D ]], iterable : _ToKeys1D , v : opt .JustInt = 1 , / ) -> _dok_base [np .int_ , _1D ]: ...
222
226
@overload
223
227
@classmethod
224
- def fromkeys (cls : type [_dok_base [np .float64 , _2D ]], ks : _ToKeys2D , v : opt .JustFloat , / ) -> _dok_base [np .float64 , _2D ]: ...
228
+ def fromkeys (
229
+ cls : type [_dok_base [np .float64 , _2D ]],
230
+ iterable : _ToKeys2D ,
231
+ v : opt .JustFloat ,
232
+ / ,
233
+ ) -> _dok_base [np .float64 , _2D ]: ...
225
234
@overload
226
235
@classmethod
227
- def fromkeys (cls : type [_dok_base [np .float64 , _1D ]], ks : _ToKeys1D , v : opt .JustFloat , / ) -> _dok_base [np .float64 , _1D ]: ...
236
+ def fromkeys (
237
+ cls : type [_dok_base [np .float64 , _1D ]],
238
+ iterable : _ToKeys1D ,
239
+ v : opt .JustFloat ,
240
+ / ,
241
+ ) -> _dok_base [np .float64 , _1D ]: ...
228
242
@overload
229
243
@classmethod
230
244
def fromkeys (
231
245
cls : type [_dok_base [np .complex128 , _2D ]],
232
- ks : _ToKeys2D ,
246
+ iterable : _ToKeys2D ,
233
247
v : opt .JustComplex ,
234
248
/ ,
235
249
) -> _dok_base [np .complex128 , _2D ]: ...
236
250
@overload
237
251
@classmethod
238
252
def fromkeys (
239
253
cls : type [_dok_base [np .complex128 , _1D ]],
240
- ks : _ToKeys1D ,
254
+ iterable : _ToKeys1D ,
241
255
v : opt .JustComplex ,
242
256
/ ,
243
257
) -> _dok_base [np .complex128 , _1D ]: ...
@@ -248,68 +262,83 @@ class dok_array(_dok_base[_SCT, _ShapeT_co], sparray, Generic[_SCT, _ShapeT_co])
248
262
# https://github.com/python/typing/issues/548
249
263
@overload
250
264
@classmethod
251
- def fromkeys (cls : type [dok_array [_SCT , _2D ]], ks : _ToKeys2D , v : _SCT , / ) -> dok_array [_SCT , _2D ]: ...
265
+ def fromkeys (cls : type [dok_array [_SCT , _2D ]], iterable : _ToKeys2D , v : _SCT , / ) -> dok_array [_SCT , _2D ]: ...
252
266
@overload
253
267
@classmethod
254
- def fromkeys (cls : type [dok_array [_SCT , _1D ]], ks : _ToKeys1D , v : _SCT , / ) -> dok_array [_SCT , _1D ]: ...
268
+ def fromkeys (cls : type [dok_array [_SCT , _1D ]], iterable : _ToKeys1D , v : _SCT , / ) -> dok_array [_SCT , _1D ]: ...
255
269
@overload
256
270
@classmethod
257
- def fromkeys (cls : type [dok_array [np .bool_ , _2D ]], ks : _ToKeys2D , v : onp .ToBool , / ) -> dok_array [np .bool_ , _2D ]: ...
271
+ def fromkeys (cls : type [dok_array [np .bool_ , _2D ]], iterable : _ToKeys2D , v : onp .ToBool , / ) -> dok_array [np .bool_ , _2D ]: ...
258
272
@overload
259
273
@classmethod
260
- def fromkeys (cls : type [dok_array [np .bool_ , _1D ]], ks : _ToKeys1D , v : onp .ToBool , / ) -> dok_array [np .bool_ , _1D ]: ...
274
+ def fromkeys (cls : type [dok_array [np .bool_ , _1D ]], iterable : _ToKeys1D , v : onp .ToBool , / ) -> dok_array [np .bool_ , _1D ]: ...
261
275
@overload
262
276
@classmethod
263
- def fromkeys (cls : type [dok_array [np .int_ , _2D ]], ks : _ToKeys2D , v : opt .JustInt = 1 , / ) -> dok_array [np .int_ , _2D ]: ...
277
+ def fromkeys (cls : type [dok_array [np .int_ , _2D ]], iterable : _ToKeys2D , v : opt .JustInt = 1 , / ) -> dok_array [np .int_ , _2D ]: ...
264
278
@overload
265
279
@classmethod
266
- def fromkeys (cls : type [dok_array [np .int_ , _1D ]], ks : _ToKeys1D , v : opt .JustInt = 1 , / ) -> dok_array [np .int_ , _1D ]: ...
280
+ def fromkeys (cls : type [dok_array [np .int_ , _1D ]], iterable : _ToKeys1D , v : opt .JustInt = 1 , / ) -> dok_array [np .int_ , _1D ]: ...
267
281
@overload
268
282
@classmethod
269
- def fromkeys (cls : type [dok_array [np .float64 , _2D ]], ks : _ToKeys2D , v : opt .JustFloat , / ) -> dok_array [np .float64 , _2D ]: ...
283
+ def fromkeys (
284
+ cls : type [dok_array [np .float64 , _2D ]],
285
+ iterable : _ToKeys2D ,
286
+ v : opt .JustFloat ,
287
+ / ,
288
+ ) -> dok_array [np .float64 , _2D ]: ...
270
289
@overload
271
290
@classmethod
272
- def fromkeys (cls : type [dok_array [np .float64 , _1D ]], ks : _ToKeys1D , v : opt .JustFloat , / ) -> dok_array [np .float64 , _1D ]: ...
291
+ def fromkeys (
292
+ cls : type [dok_array [np .float64 , _1D ]],
293
+ iterable : _ToKeys1D ,
294
+ v : opt .JustFloat ,
295
+ / ,
296
+ ) -> dok_array [np .float64 , _1D ]: ...
273
297
@overload
274
298
@classmethod
275
299
def fromkeys (
276
300
cls : type [dok_array [np .complex128 , _2D ]],
277
- ks : _ToKeys2D ,
301
+ iterable : _ToKeys2D ,
278
302
v : opt .JustComplex ,
279
303
/ ,
280
304
) -> dok_array [np .complex128 , _2D ]: ...
281
305
@overload
282
306
@classmethod
283
307
def fromkeys (
284
308
cls : type [dok_array [np .complex128 , _1D ]],
285
- ks : _ToKeys1D ,
309
+ iterable : _ToKeys1D ,
286
310
v : opt .JustComplex ,
287
311
/ ,
288
312
) -> dok_array [np .complex128 , _1D ]: ...
289
313
290
314
#
291
315
class dok_matrix (_dok_base [_SCT , _2D ], spmatrix [_SCT ], Generic [_SCT ]):
292
316
@override
293
- def get (self , key : _ToKey2D , / , default : onp .ToComplex = 0.0 ) -> _SCT : ...
317
+ def get (self , / , key : _ToKey2D , default : onp .ToComplex = 0.0 ) -> _SCT : ...
294
318
@override
295
319
def setdefault (self , key : _ToKey2D , default : onp .ToComplex | None = None , / ) -> _SCT : ...
296
320
297
321
#
298
322
@overload
299
323
@classmethod
300
- def fromkeys (cls , ks : _ToKeys2D , v : _SCT , / ) -> Self : ...
324
+ def fromkeys (cls , iterable : _ToKeys2D , v : _SCT , / ) -> Self : ...
301
325
@overload
302
326
@classmethod
303
- def fromkeys (cls : type [dok_matrix [np .bool_ ]], ks : _ToKeys2D , v : onp .ToBool , / ) -> dok_matrix [np .bool_ ]: ...
327
+ def fromkeys (cls : type [dok_matrix [np .bool_ ]], iterable : _ToKeys2D , v : onp .ToBool , / ) -> dok_matrix [np .bool_ ]: ...
304
328
@overload
305
329
@classmethod
306
- def fromkeys (cls : type [dok_matrix [np .int_ ]], ks : _ToKeys2D , v : opt .JustInt = 1 , / ) -> dok_matrix [np .int_ ]: ...
330
+ def fromkeys (cls : type [dok_matrix [np .int_ ]], iterable : _ToKeys2D , v : opt .JustInt = 1 , / ) -> dok_matrix [np .int_ ]: ...
307
331
@overload
308
332
@classmethod
309
- def fromkeys (cls : type [dok_matrix [np .float64 ]], ks : _ToKeys2D , v : opt .JustFloat , / ) -> dok_matrix [np .float64 ]: ...
333
+ def fromkeys (cls : type [dok_matrix [np .float64 ]], iterable : _ToKeys2D , v : opt .JustFloat , / ) -> dok_matrix [np .float64 ]: ...
310
334
@overload
311
335
@classmethod
312
- def fromkeys (cls : type [dok_matrix [np .complex128 ]], ks : _ToKeys2D , v : opt .JustComplex , / ) -> dok_matrix [np .complex128 ]: ...
336
+ def fromkeys (
337
+ cls : type [dok_matrix [np .complex128 ]],
338
+ iterable : _ToKeys2D ,
339
+ v : opt .JustComplex ,
340
+ / ,
341
+ ) -> dok_matrix [np .complex128 ]: ...
313
342
314
343
#
315
344
def isspmatrix_dok (x : object ) -> TypeIs [dok_matrix ]: ...
0 commit comments