iinfo(type) Machine limits for integer types. Attributes ---------- bits : int The number of bits occupied by the type. dtype : dtype Returns the dtype for which `iinfo` returns information. min : int The smallest integer expressible by the type
| 344 | |
| 345 | @set_module('numpy') |
| 346 | class iinfo: |
| 347 | """ |
| 348 | iinfo(type) |
| 349 | |
| 350 | Machine limits for integer types. |
| 351 | |
| 352 | Attributes |
| 353 | ---------- |
| 354 | bits : int |
| 355 | The number of bits occupied by the type. |
| 356 | dtype : dtype |
| 357 | Returns the dtype for which `iinfo` returns information. |
| 358 | min : int |
| 359 | The smallest integer expressible by the type. |
| 360 | max : int |
| 361 | The largest integer expressible by the type. |
| 362 | |
| 363 | Parameters |
| 364 | ---------- |
| 365 | int_type : integer type, dtype, or instance |
| 366 | The kind of integer data type to get information about. |
| 367 | |
| 368 | See Also |
| 369 | -------- |
| 370 | finfo : The equivalent for floating point data types. |
| 371 | |
| 372 | Examples |
| 373 | -------- |
| 374 | With types: |
| 375 | |
| 376 | >>> import numpy as np |
| 377 | >>> ii16 = np.iinfo(np.int16) |
| 378 | >>> ii16.min |
| 379 | -32768 |
| 380 | >>> ii16.max |
| 381 | 32767 |
| 382 | >>> ii32 = np.iinfo(np.int32) |
| 383 | >>> ii32.min |
| 384 | -2147483648 |
| 385 | >>> ii32.max |
| 386 | 2147483647 |
| 387 | |
| 388 | With instances: |
| 389 | |
| 390 | >>> ii32 = np.iinfo(np.int32(10)) |
| 391 | >>> ii32.min |
| 392 | -2147483648 |
| 393 | >>> ii32.max |
| 394 | 2147483647 |
| 395 | |
| 396 | """ |
| 397 | |
| 398 | _min_vals = {} # noqa: RUF012 |
| 399 | _max_vals = {} # noqa: RUF012 |
| 400 | |
| 401 | __class_getitem__ = classmethod(types.GenericAlias) |
| 402 | |
| 403 | def __init__(self, int_type): |
no outgoing calls
searching dependent graphs…