Daniel Duffy
C++ author, trainer
- Joined
- 10/4/07
- Messages
- 10,335
- Points
- 648
I am looking for books on Numpy and Scipy, with focus on the numerical algorithms and background. I am not interested in having to wade in syntax before getting to these topics.
Any suggestions? Thx!
I had a look at the contents; the price spread is $[39,118]. The price seems to be a monotonic function on how fancy the title seems to be.some good books on python that focus on mathematics
amit saha - doing math with python
yahya osais - computer simulation
jose garrido - computational models with python
jose unpingco - python for probability, statistics and machine learning
anything written by yves hilpsich (e.g., python for finance - analyze big financial data)
fabio nelli - python data analytics
jaan kiusalaas - numerical methods in engineering with python
ivan idris - numpy cookbook
The price seems to be a monotonic function on how fancy the title seems to be.
How about
#include <boost/python/module.hpp>
#include <boost/python/def.hpp>
char const* greet()
{
return "hello, world";
}
BOOST_PYTHON_MODULE(hello_ext)
{
using namespace boost::python;
def("greet", greet);
}
I am looking for books on Numpy and Scipy, with focus on the numerical algorithms and background. I am not interested in having to wade in syntax before getting to these topics.
Any suggestions? Thx!
class PointTest:
# Counterexample: class with "private" attributes
def __init__(self,x=-10, y=0): #default values
self.move(x,y)
def move(self, x, y):
self._x = x
self._y = y
self.__x = x
self.__y = y
def printI(self):
print (self._x, self._y)
def printII(self):
print (self.__x, self.__y)
pp = PointTest(1,2)
pp._x = -1; pp._y = -2
print("Private in name only? (PINO)")
print(pp._x); print(pp._y); #-1, -2
#print(pp.__x); print(pp.__y); #AttributeError
pp.printI() #(-1,-2)
pp.printII() #(1,2)
import pandas as pd
from pandas import datetime, period_range
#compiles
#myRange = pd.period_range('2000-01-01', periods=12, freq='T')
#ts = pd.Series(range(12), index=myRange)
#NOT compile
range = pd.period_range('2000-01-01', periods=12, freq='T')
ts = pd.Series(range(12), index=range)
ts.index = ts.index.astype('datetime64[ns]')
data_higher_freq = ts.resample('5T').sum()
range = 12
range1 = pd.date_range('2000-01-01', periods=12, freq='T')
ts = pd.Series(range(12), index=range1)
def range(i):
print ("range")
return 1/0
Even this doesn't compile (BTW I am trying to break the compiler). I am accidentally or deliberately overriding what is in essence an (undocumented) Python keyword 'range'.
Code:range = 12 range1 = pd.date_range('2000-01-01', periods=12, freq='T') ts = pd.Series(range(12), index=range1)
again, you are re-defining what range is. Python allows you to do that. Functions are first class citizens.Even this doesn't compile (BTW I am trying to break the compiler). I am accidentally or deliberately overriding what is in essence an (undocumented) Python keyword 'range'.
Code:range = 12 range1 = pd.date_range('2000-01-01', periods=12, freq='T') ts = pd.Series(range(12), index=range1)
This is not an undocumented keyword. It's a library function and you are allowed in python to do rename/re-define anything that is not a reserved keyword. Here is the list of keywords 2. Lexical analysis — Python 3.8.0 documentationEven this doesn't compile (BTW I am trying to break the compiler). I am accidentally or deliberately overriding what is in essence an (undocumented) Python keyword 'range'.
Code:range = 12 range1 = pd.date_range('2000-01-01', periods=12, freq='T') ts = pd.Series(range(12), index=range1)