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