I don't know if we can replace both `updateUser` and `updateMovie` with a single update function.  Look at how both functions index into the ratings array in the ScalaALS example:

```scala
def updateMovie(i: Int, ...) {
...
    for (j <- 0 until U) {
    ....
          blas.daxpy(R.get(i, j), u, Xty)
```

and

```scala
def updateUser(j: Int, ...) {
...
    for (i <- 0 until M) {
    ....
          blas.daxpy(R.get(i, j), m, Xty)
```

In these cases, the position of the loop variable changes in the call to `R.get()`.

In the Python update function, the loop variable always occupies the second position when indexing into `ratings`.  It seems like this will cause range issues.

I'd like to keep the examples consistent across languages, so if you see a way to simplify the ALS example, try implementing the simplifications in the Scala versions first and verify that they do not change that program's output.