python笔记

  • python
    • basic data types
    • containers
    • Function
    • class
  • Numpy
    • arrays
    • array indexing
    • datatypes
    • array math
    • broadcasting
  • scipy
    • image oprations
    • matlab files
    • distance between points
  • matplotlib
    • subplots
    • images

简单学了一下cs231n所需要的python

python

basic data types

basic types: integer,float,boolean,string
numbers:
no increasement or decrement operators
boolean:
use english words in boolean logic: and,or,not,!=[xor]
string:
upper,center,replace…

containers

list:
resizeable and can contain elements of different types
nevigative indices count from the end of the list
slicing:
access sublists
list comprehension(can also contain condition)
dictionaries:
store pairs
set:
unordered collection of distinct elements
cannot make assumptions about the order
tuples:
can used as keys in dictionaries

Function

def

class

calss

Numpy

core library for scientific computing in python.

arrays

numpy is a grid of values of same type
rank: number of dimension
index:ononegative integers
shape: a tuple of integers giving the size of array along each dimension
improt numpy as np

array indexing

can be sliced

datatypes

array math

*is elementwise multiplication
dot function
T transpose(.T)

broadcasting

use small array multiple times to perform some operation on the big array

scipy

image oprations

can read images from disk into numpy arrays…

matlab files

distance between points

matplotlib

plot

subplots

images

你可能感兴趣的:(python笔记)