Level 10 : What will be the output of the following code?


import numpy as np

a = np.array([1, 2, 3, 4, 5])
print(a[a > 3])

Author: KaivalyaG | Tags: numpy | 1859+ Python FAQs | Share
string-iteration | match | logical-operator | mapping-function | logical-operators | loop-control-statements | list-method | list,-set,-and-dictionary-comprehensions | swapping | python | string | thread | regular-expression | operator-and | using-the-threading-module | python-django | list-methods-and-slicing | syntaxerror | logical-operator | stack | object-attribute | using-join()-and-is_alive()-methods | python-repl | slice | memory-management | class | assignment-operator | nested-loop | complex | dicts | indentation | encoding | round-function | multiple-inheritance | fabs-function | polymorphism | comparison | slicing | creating-and-starting-threads | list-mutation | multiprocessing | immutability | access-modifier | implementation | operators | conditional-statement | odd-number | indexing:-loc-vs-iloc | control-flow | list | introduction-to-python | matrix-list-comprehension | error | compute | walking-through-directories-using-os.walk() | choice | file-handling | tuple-methods | inheritance | multiple-inheritance | benefit | regex | __init_subclass__ | generators-in-python | pep | call | binary | datetime.date,-datetime.time,-datetime.datetime | sets | namespace | gil | raise-statement | overflow | multithreading | __future__ | method | integers | exception-handling | input-function | error-handling | numpy | floating-point-precision | precedence-and-associativity | design-principle | built-in-function | managing-directories-with-os-and-shutil | introduction-to-multiprocessing | assignment-operators | collections | math | arbitrary-arguments-(*args,-**kwargs) | loop | matplotlib | reading-and-writing-large-files-efficiently | turtle | anchors-(^,-$) | split | sum-function | python_version | global-variable | command-line-parsing | conditional-statement | binary-operation | integer | collection | list-comprehension | membership-operators-(in,-not-in) | class-and-instance-variable | single-inheritance | mathematics | with-statement | while-loops | using-else-and-finally | indexing | class-and-inheritance | virtual-environment | min-function | while-loop | data-type | string-slicing | join | escape-operator | round | while-else-loop | tuple-unpacking | exception | sum() | version | inherit | built-in | defining-functions | class-decorators | python-history | list-join | syntax-error | classes | string-formatting | data-types | string-methods | encapsulation | __all__-attribute | boolean | center | print-statement | asyncio | zip-function | file_handling | min-max-function | head-and-tail | scientific-notation | pandas | attribute | feature | built-in-function | recurssion | string-manipulation | methods | exception-handling | generator | higher-order-function | datatype | operator-or | data-structure | application | lambda-function | complex-number | for | library | lambda | bitwise | name-mangling | function-and-scope | function | working-with-temporary-files-using-tempfile | literal-characters-and-special-characters | format | max-min | invalid-list | identity-operator | creating-custom-modules | quantifiers-(*,-+,-?,-{}) | list-operation | why-use-multiprocessing-over-threading?-(gil) | python-operators | set | counter-function | mysql | test-discovery | opening-files-(open()) | string-method | booleans | iterator | pickling--unpickling | list-slicing | joining-and-merging-dataframes | zfill-function | expand-tab | list-vs-tuple | frozenset | multiple-except-blocks | namedtuple | regular-expressions | introduction-to-threads | thread-synchronization | syntax | id-function | expression | loop-control | default-mutable-argument | bitwise-operator | comment | assert | string-method | using-map()-for-transformations | recursion | virtual-environment | async | parsing-with-strptime | arithmetic-operation | def | oop | data-structure | sys-module | oops | comprehension | counter | reading:-read(),-readline(),-readlines() | directory-operations | using-yield-in-functions | factorial-function | asyncio-module | descriptors | return-statement | map-function | installation | dictionary-comprehensions | data_structure | boolean-and-non-boolean | difference-between-threads-and-processes | boolean-masking | strings | syntax-error | python-module | sorting-and-ranking | string-concatenation | tuple | string-formatting | tuples | pass | update | built-in-modules | import-method | handling-missing-values-(fillna,-dropna) | statement | operations | touples | identity-operators-(is,-is-not) | postfix | type-conversion | append | loops | key-value-pairs | using-lists-as-stacks | operand | else-statement | list-comprehension | mutable | staticmethod | identity-operator | docstring | global | sys | sorting | shallow-copy | int | immutable-data-type | typeerror | filter-function | formal-and-actual-parameter | string-slicing | writing:-write(),-writelines() | formatting-with-strftime | goto-function | type-conversion | using-assertions-(assertequal,-assertraises) | file | list-comprehensions | overriding-methods | while-and-for-loop | data-structures-in-python | heap-memory | rollback | global-variable | software-design | lambdas | aggregating-data-with-functools.reduce() | random | context-manager | working-with-dates-and-times | threading | destructor | print | conditional-statements | array | keyword | bitwise-operator | unit-testing | exponentiation | magic-method | sorted | module | static-method | error-handling | advanced-file-operations | memory | identifier | python-syntax-and-structure | dictionary | arithmetic-expression | matrix | random-function | dictionary-methods | intering | parameter | control-flow | objects | lists | time-series-with-pandas | function-argument | numeric | zip | operator | class-and-object | using-os-and-pathlib-modules | logical-operation | raise | decimal | default-arguments | pseudocode | interpreter | constructor | copy | operator-overloading | functional-programming | else | deep-copy | version-check | reading-and-writing-files | dictionaries | enumerate() | datetime | debugging | variable | working-with-file-paths | thread-safe-data-structures-(queue.queue) | mathematical-function | type-conversion-and-casting | conversion | control-statement | yield | data-structures | global-keyword | input-function | floats | data-type-conversions | iterators | data-type | type_conversion | file-handling | dataframe-and-series-objects | range | filtering-and-indexing | package-management | filter | method-overloading | decorator | lambda-functions | init | basic | input | generators | working-with-binary-files-(rb,-wb) | set-operation | functional-programming | iterable | math-copysign | list-indexing | precedence | functions | condition ...