Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
mask convert boolean values to number #num = np.arange(1,11)
Home
NumPy
mask convert boolean values to number #num = np.arange(1,11)
+1
vote
asked
Jul 9, 2021
in
NumPy
by
rajeshsharma
mask convert boolean values to number #num = np.arange(1,11)
convert-boolean
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Jul 9, 2021
by
rajeshsharma
mask convert boolean values to number #num = np.arange(1,11)
mask = num>5
print(‘print bigger than 5 numbers’,num[mask]) #5,7,8,9,10
Your comment on this answer:
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Related questions
+1
vote
Q: print value who divide by 2 and remain is 0.
asked
Jul 9, 2021
in
NumPy
by
rajeshsharma
convert-boolean
+1
vote
Q: Print number from 1 to 10 using arange() function
asked
Jul 9, 2021
in
NumPy
by
rajeshsharma
print-arange
+1
vote
Q: What is 2d indexing? define one ex : num = np.array([1,2,3],[4,5,6],[7,8,9])
asked
Jul 4, 2021
in
NumPy
by
sharadyadav1986
2d-indexing
0
votes
Q: I want to know all the values in c(1, 4, 5, 9, 10) that are not in c(1, 5, 10, 11, 13). How do I do that with one built-in function in R? How could I do it if that function didn't exist?
asked
Jun 15, 2023
in
R Basics
by
john ganales
-function
0
votes
Q: The fraction (5x-11)/(2x2 + x - 6) was obtained by adding the two fractions A/(x + 2) and B/(2x - 3). The values of A and B must be, respectively: (a) 5x, -11, (b) -11, 5x, (c) -1, 3, (d) 3, -1, (e) 5, -11
asked
May 21, 2019
in
Mathematics
by
sheetalkhandelwal
#maths
#mathematics
Mathematics-questions-answers
0
votes
Q: Which of these values are falsy? 0; new Number(0); (''); (' '); new Boolean(false); undefined;
asked
Feb 27
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
+1
vote
Q: print random number from 0 to 1
asked
Jul 8, 2021
in
NumPy
by
rajeshsharma
print-random-number
+2
votes
Q: What is 1d indexing? define one ex : num = np.array([5,15,25,35])?
asked
Jul 4, 2021
in
NumPy
by
sharadyadav1986
1d-indexing
0
votes
Q: Find out the mean, median and standard deviation of this numpy array -> np.array([1,5,3,100,4,48])
asked
Feb 11, 2021
in
Python
by
SakshiSharma
#python
python-meanm
python-numpy-array
Python-questions-answers
0
votes
Q: What is the output of print(np.array([1,2,3]) * np.array([[1],[2],[3]]) )?
asked
Jan 28, 2020
in
Data Handling
by
rahuljain1
#print-output
DataHandling-questions-answers
...