Code Monkey home page Code Monkey logo

inf5860_uke1's Introduction

inf5860_uke1

Hent koden til oppgavene med:

git clone https://github.com/sigmunjr/inf5860_uke1.git

I filene indexing.py, math_operations.py og konvolusjon.py, er det oppgaver for å lære nettopp indeksering, matematiske operasjoner og konvolusjoner ved hjelp av python og numpy. I hver av disse filene er det en rekke funksjoner f.eks. math1, math2 osv. Din oppgave er å få disse funksjonene til å returnere riktig resultat. Oppgave teksten står under definisjonen av funksjonen. f.eks.

def math1(mat):
  """
  Square each value in mat separatly
  """
  return mat

Denne oppgaven løses ved å endre funksjonen slik:

def math1(mat):
  """
  Square each value in mat separatly
  """
  return mat**2

For å teste om du har løst oppgavene riktig kan du kjøre:

$ nosetests

Fra mappen inf5860_uke1. Da blir filene med test_ kjørt og man får et svar på hvor mange oppgaver som er gjort riktig. For å teste en enkelt oppgave kan du f.eks. kjøre (her testes funksjonen index1 i filen indexing.py):

$ nosetests test_indexing.py:test_index1

Husk at du også kan lese test koden i f.eks. test_indexing.py for å bedre forstå oppgaven.

Løsningene finner du ved

$ git clone https://github.com/sigmunjr/inf5860_uke1_solutions.git

inf5860_uke1's People

Contributors

sigmunjr avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.