1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
ladessa [460]
3 years ago
5

Which Numpy function do you use to create an array? (Points : 1) np

Computers and Technology
1 answer:
ra1l [238]3 years ago
6 0

Answer:

The correct option is np.array

Explanation:

Numpy is a library to perform numerical calculation in python. It allows us to create and modify vectors, and make operations on them easily. Numpy arrays are an excellent alternative to python lists. Some of the key advantages of numpy arrays are that they are fast, easy to work with, and offer users the opportunity to perform calculations through full arrays.

To start using numpy, the library must be imported:

import numpy as np

The most common way to create a vector or matrix already initialized is with the np.array function, which takes a list (or list of lists) as a parameter and returns a numpy matrix. The numpy arrays are static and homogeneous typing. They are more efficient in the use of memory.

Example:

list = [25,12,15,66,12.5]

v = np.array (list)

print (v)

You might be interested in
6. Larger Than n In a program, write a function that accepts two arguments: a list, and a number n. Assume that the list contain
Reika [66]

Answer:

The solution code is written in Python

  1. def largerThanN(myList, n):
  2.    output = ""
  3.    for x in myList:
  4.        if(x > n):
  5.            output += str(x) + " "
  6.    
  7.    print(output)
  8. l = [5, 12, 11, 4, 56, 32]
  9. n = 15
  10. largerThanN(l, n)

Explanation:

Firstly, create a function largerThanN that accepts two arguments, a list (myList) and a number (n) (Line 1).

Next, create a output variable to hold the string of numbers in the list that are greater than the input number n (Line 2).

Create a for loop to traverse through each number in the list and then check if the current x is bigger than n. If so concatenate the x to output string along with a single space " " (Line 4 -6)

After the loop, print the output string (Line 8)

We test the function by using a sample list and n = 15 (Line 10 - 12). The program will display 56 32 .

6 0
3 years ago
Need help answering this
elena55 [62]
I think it is c if that helps x
3 0
3 years ago
Wrire a code that display elements at indices 1 and 4 in the follwoing array.
Sveta_85 [38]

Answer:

Console.log(userArray[1]);

Console.log(userArray[4]);

Explanation:

The programming language was not stated; however, the variable declaration implies JavaScript.

JavaScript prints using the following syntax:

Console.log(print-name);

Since, the code is to print some elements of array userArray.

First, we need to determine the index of the elements.

The indices are given as 1 and 4.

So, the code to print these elements is as follows:

Console.log(userArray[1]);

Console.log(userArray[4]);

8 0
3 years ago
How do you open an application on the macOS?
timama [110]

Click the Launchpad icon in the Dock, or pinch closed with your thumb and three fingers on your trackpad. Then click an app to open it. You can also type an app's name to find the app in Launchpad, then press the Return key to open it.

3 0
3 years ago
Read 2 more answers
Tony is in charge of all presentations for a Fortune 500 pharmaceutical company. In addition to creating powerful and persuasive
Ludmilka [50]

Tony uses the Document Inspector dialog box to <u>remove confidential company information</u> from the presentation.

Explanation:

Document Inspector dialogue box has come as boon to the presentation and office document makers. This saves them from any discrepancies’ regarding revealing any sensitive information, unwanted information, hidden data’s etc.

These information’s if released can be a matter of concern for the employee as well as an organisation. Document inspector prevents an employee from later embarrassment and any legal troubles arising out of his actions.

Hence, Tony who is in charge of Fortune 500 pharma company decided to use Document Inspector dialogue box to make sure that his presentation his complete in all aspects of professionalism and is bereft of any sensitive and unwarranted information.  

5 0
3 years ago
Other questions:
  • Which type of natural hazard is sometimes caused by human activity?
    6·1 answer
  • Given the following code fragment, how many times does the loop body execute? int laps = 50; int myNum = 1; do { myNum = myNum +
    9·1 answer
  • Pls help is very urgent and I will mark u as brainliest plsssss​
    11·2 answers
  • Why is it a good idea to understand what you are good at and what you enjoy
    11·2 answers
  • When reading words with a scanner object, a word is defined as ____?
    15·1 answer
  • Choose the correct option below:Part A1. WAN link 2. Client 3. Server 4. Hub 5. Switch 6. Router 7. Media Part BA. This serves u
    9·1 answer
  • What file name would allow you to easily find and edit your document later in Word Online?
    14·2 answers
  • Jerry can use an <br> program to restrict information from going out without his permission.
    12·2 answers
  • Name the box where the name of the first cell of the selected range appears?
    7·1 answer
  • Get ready to be the Quizmaster! You are going to design your own Python game show in the style of a quiz.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!