Repository: California-Planet-Search/radvel

Issue:
Using a list in EccentricityPrior raises TypeError
Hi,
When using a list to initialize `EccentricityPrior`, I get the following error:
```python
----> 1 radvel.prior.EccentricityPrior([1, 2])

~/astro/radvel/radvel/prior.py in __init__(self, num_planets, upperlims)
     96
     97         if type(upperlims) == float:
---> 98             self.upperlims = [upperlims] * npl
     99         else:
    100             assert len(upperlims) == len(self.planet_list), "Number of eccentricity \

TypeError: can't multiply sequence by non-int of type 'list'
```
This seems to happen because `npl` is set to `num_planet` when it is a list (see [Line 95](https://github.com/California-Planet-Search/radvel/blob/master/radvel/prior.py#L95)). I just checked and changing `npl` to always be `len(self.planet_list)` or switching lines 92 and 95 both work.

Discussion:
vandalt: @bjfultn, should I add an extra prior (`EccentricityPrior([1])`) in the [priors test](https://github.com/California-Planet-Search/radvel/blob/master/radvel/tests/test_api.py#L252) along with the fix ?
bjfultn: Yes please, the only thing better than PRs from the community is PRs that include new tests!
bjfultn: Make sure you pull over from `next-release` too so that you are up to date with changes already staged for release.

Patch:
diff --git a/radvel/prior.py b/radvel/prior.py
index b60ff71..eb1d934 100644
--- a/radvel/prior.py
+++ b/radvel/prior.py
@@ -89,10 +89,10 @@ class EccentricityPrior(Prior):
 
         if type(num_planets) == int:
             self.planet_list = range(1, num_planets+1)
-            npl = len(self.planet_list)
+            npl = num_planets
         else:
             self.planet_list = num_planets
-            npl = num_planets
+            npl = len(self.planet_list)
 
         if type(upperlims) == float:
             self.upperlims = [upperlims] * npl


Test patch:
diff --git a/radvel/tests/test_api.py b/radvel/tests/test_api.py
index 67ae2fc..7f93f0f 100644
--- a/radvel/tests/test_api.py
+++ b/radvel/tests/test_api.py
@@ -251,6 +251,7 @@ def test_priors():
 
     prior_tests = {
         radvel.prior.EccentricityPrior(1):                  1/.99,
+        radvel.prior.EccentricityPrior([1]):                1/.99,
         radvel.prior.PositiveKPrior(1):                     1.0,
         radvel.prior.Gaussian('per1', 9.9, 0.1):            scipy.stats.norm(9.9,0.1).pdf(10.),
         radvel.prior.HardBounds('per1', 1.0, 9.0):          0.,
@@ -325,4 +326,4 @@ if __name__ == '__main__':
     test_basis()
     #test_kernels()
     #test_kepler()
-    #test_priors()
\ No newline at end of file
+    #test_priors()