0

I am a newbie to Colabs and want to work through this tutorial on Linear Algebra

There is a snippet

!pip install -U mxnet-cu101==1.7.0

and another

from mxnet import np, npx

npx.set_np()

x = np.array(3.0)
y = np.array(2.0)

x + y, x * y, x / y, x**y

When I click to run it I get Warning message

Or in text

This notebook is being loaded from GitHub It may request access to your data stored with Google or read data and credentials. Please review the source code before executing this notebook

How do I determine whether it is safe to proceed?

Do I look up np and npx in the source code for mxnet. Where do I even find mxnet?

It seems rather daunting when I am just trying to get started.

[Update]

I found information about installing via pip here and mxnet-cu101 here

[Update]

I ran the install and the snippet as follows.

output

Kirsten
  • 15,730
  • 41
  • 179
  • 318
  • 1
    Perhaps a more productive question would be "Where is that snippet from?" Do you trust its source? Is it trying to teach you something about the modules its using? That code is short enough that it's likely trying to demonstrate something very basic about the libraries it is using. If you don't know what they are, it's probably not useful to run it, since you won't understand the results. – Blckknght Nov 06 '21 at 06:58
  • I have edited to explain more without having to click the link. – Kirsten Nov 06 '21 at 08:26
  • 1
    Well, the library itself looks legit. From the installation code at the top of the notebook, it's using [Apache MXNet](https://mxnet.apache.org/versions/1.8.0/). Unfortunately, I don't find any docs of the `np` or `npx` submodules. Oh, hang-on, I found it in the most recent version of the docs (not for the pinned version used in the notebook), [here](https://mxnet.apache.org/versions/master/api/python/docs/api/np/index.html). – Blckknght Nov 06 '21 at 08:49
  • Thank you. I ran it and you are correct that I don't really understand the answer yet.. but I am working on it ;-) – Kirsten Nov 06 '21 at 16:17
  • I guess it just demonstrates that a scalar plus a scalar is a scalar. etc. – Kirsten Nov 06 '21 at 20:24

0 Answers0