I saw np.int0used to convert bounding box floating point values to int in OpenCV tasks. What is np.int0? I saw np.uint8, np.int32etc. I can not find np.int0in any online documentation. What type of int does these arguments use?
np.int0
np.uint8
np.int32
int0is an alias forintp ; this in turn amounts to
int0
intp
The integer used for indexing (same as C ssize_t, usually either int32or int64)
int32
int64
- Numpy docs: basic types
Here is some more info:
# get complete list of datatype names >>> np.sctypeDict.keys() # returns the default integer type (here `int64`) >>> np.sctypeDict['int0'] <class 'numpy.int64'> # verify >>> arr = np.int0([1, 2, 3]) >>> arr.nbytes 24
This is a simple alias int64, try this from Python 2 or Python 3:
>>> import numpy >>> numpy.int0 is numpy.int64 True
Source: https://habr.com/ru/post/1692443/More articles:Logging into Firebase to log in, where do I need to put the Firebase security code? - reactjsHow (should I) mock DocumentClient for unit testing DocumentDb? - c #Как эмулировать и звать вызов от XS? - perlРекурсивно обматывать вызовы метода с помощью плагинов/макросов компилятора - scalaHow to extract contents in square brackets in ruby - ruby | fooobar.comWhat does IE do with my select clause? - javascriptMerge multiple zip files on s3 into fewer zip files - amazon-s3Is there a danger associated with streaming data to the C ++ exception class? - c ++Implementation of unification and omissions of variables - javaR: Split row into new row and column - rAll Articles