[PYTHON] Convert elements of numpy array from float to int

I want to cut out some numerical values with int from the float data set.

target = np.array(features[:,7], dtype=int)

Recommended Posts

Convert elements of numpy array from float to int
Convert numpy int64 to python int
I want to judge the authenticity of the elements of numpy array
Convert dict to array
Set the number of elements in a NumPy one-dimensional array to a power of 2 (0 padded)
Convert NumPy array "ndarray" to lilt in Python [tolist ()]
[Updated from time to time] Review of Let Code NumPy
Subscript access to python numpy array
numpy: I want to convert a single type ndarray to a structured array
Convert from pdf to txt 2 [pyocr]
Extract multiple elements with Numpy array
How to convert from .mgz to .nii.gz
Various ways to create an array of numbers from 1 to 10 in Python.
How to easily convert format from Markdown
Convert from PDF to CSV with pdfplumber
Convert from katakana to vowel kana [python]
Convert array (struct) to json with golang
Summary of vtkThreshold (updated from time to time)
Convert from Markdown to HTML in Python
Introduction to Scapy ① (From installation to execution of Scapy)
Save an array of numpy to a wav file using the wave module
Use numpy to remove columns or rows that contain elements of certain conditions
Checklist on how to avoid turning the elements of numpy's array with for
Extract elements (using a list of indexes) in a NumPy style from a Python list / tuple
Summary of gcc options (updated from time to time)
Convert "number" of excel date to python datetime
[Ansible installation procedure] From installation to execution of playbook
Add rows to an empty array with numpy
Sort the elements of the array by specifying the conditions
Change the decimal point of logging from, to.
The shape of the one-dimensional array of numpy was complicated
Convert a multidimensional list (array) to one dimension
How to get dictionary type elements of Python 2.7
[Python numpy] Dynamically specify the index of the array
Calculation speed of indexing for numpy quadratic array
Randomly select elements from list (array) in python
Convert exponential notation float to str in Python
From the introduction of pyethapp to the execution of contract
Convert pandas dataframe elements to regular string type
Pass an array from PHP to PYTHON and do numpy processing to get the result