ADVISOR APPROVED TECHNICAL ELECTIVES
Both graduate programs require 16 units of graduate coordinator approved technical electives. These electives must be at the 400 or 500 level otherwise they will not count. Any CSC or CPE course at the appropriate level is pre-approved, except for additional restrictions on independent study and co-op units (details here). This includes EE courses that are cross-listed with CPE (for example, EE/CPE 428 is a popular elective).
If a course outside CSC and CPE makes sense for your area of specialization (for instance, advanced STAT classes are appropriate for a data scientist) it will likely be approved. You cannot use more than 8 units of external electives for your graduate degree. You must verify approval with the graduate coordinator prior to taking the course to avoid unpleasant surprises that can delay graduation.