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