Fixed pmap.
Refactoring
Use multiprocessing.cpu_count.
Fixed partition_weighted.
Added a test.
Merge branch 'master' into origin-alpha

Conflicts:
	test/misc_test.py